+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66043
+ * gfortran.dg/storage_size_6.f90: New tests.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66044
bad_proc = true;
/* (ii) The assignment is in the main program; or */
- if (gfc_current_ns->proc_name->attr.is_main_program)
+ if (gfc_current_ns->proc_name
+ && gfc_current_ns->proc_name->attr.is_main_program)
bad_proc = true;
/* (iii) A module or internal procedure... */
- if ((gfc_current_ns->proc_name->attr.proc == PROC_INTERNAL
- || gfc_current_ns->proc_name->attr.proc == PROC_MODULE)
+ if (gfc_current_ns->proc_name
+ && (gfc_current_ns->proc_name->attr.proc == PROC_INTERNAL
+ || gfc_current_ns->proc_name->attr.proc == PROC_MODULE)
&& gfc_current_ns->parent
&& (!(gfc_current_ns->parent->proc_name->attr.function
|| gfc_current_ns->parent->proc_name->attr.subroutine)
|| gfc_current_ns->parent->proc_name->attr.is_main_program))
{
/* ... that is not a function... */
- if (!gfc_current_ns->proc_name->attr.function)
+ if (gfc_current_ns->proc_name
+ && !gfc_current_ns->proc_name->attr.function)
bad_proc = true;
/* ... or is not an entry and has a different name. */
--- /dev/null
+! { dg-do compile }
+! PR fortran/66045
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+program p
+ contains
+ integer :: null=null() ! { dg-error "NULL appears on right-hand side" }
+end