2008-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34910
* expr.c (gfc_check_assign): It is an error to assign
to a sibling procedure.
2008-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34910
* gfortran.dg/proc_assign_2.f90: New test.
From-SVN: r131985
+2008-01-31 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34910
+ * expr.c (gfc_check_assign): It is an error to assign
+ to a sibling procedure.
+
2008-01-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34975
bad_proc = true;
}
+ /* (iv) Host associated and not the function symbol or the
+ parent result. This picks up sibling references, which
+ cannot be entries. */
+ if (!sym->attr.entry
+ && sym->ns == gfc_current_ns->parent
+ && sym != gfc_current_ns->proc_name
+ && sym != gfc_current_ns->parent->proc_name->result)
+ bad_proc = true;
+
if (bad_proc)
{
gfc_error ("'%s' at %L is not a VALUE", sym->name, &lvalue->where);
+2008-01-31 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34910
+ * gfortran.dg/proc_assign_2.f90: New test.
+
2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+! { dg-do compile }
+! This checks the fix for PR34910, in which the invalid reference
+! below caused an ICE.
+!
+! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
+!
+MODULE foo
+CONTAINS
+ INTEGER FUNCTION f()
+ f = 42
+ CONTAINS
+ LOGICAL FUNCTION f1()
+ f1 = .TRUE.
+ END FUNCTION
+
+ LOGICAL FUNCTION f2()
+ f1 = .FALSE. ! { dg-error "not a VALUE" }
+ END FUNCTION
+ END FUNCTION
+END MODULE
+! { dg-final { cleanup-modules "foo" } }