PR fortran/39930
PR fortran/39931
* expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
side is a pointer.
* parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2009-04-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/39930
PR fortran/39931
* gfortran.dg/ambiguous_reference_2.f90: New.
* gfortran.dg/pointer_assign_7.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146880
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-04-28 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/39930
+ PR fortran/39931
+ * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
+ side is a pointer.
+ * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
+
2009-04-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39879
if (pointer)
check_intent_in = 0;
- if (ref->type == REF_COMPONENT && ref->u.c.component->attr.pointer)
- pointer = 1;
+ if (ref->type == REF_COMPONENT)
+ pointer = ref->u.c.component->attr.pointer;
if (ref->type == REF_ARRAY && ref->next == NULL)
{
sym->attr.referenced = 1;
for (ns = siblings; ns; ns = ns->sibling)
{
- gfc_find_sym_tree (sym->name, ns, 0, &st);
+ st = gfc_find_symtree (ns->sym_root, sym->name);
if (!st || (st->n.sym->attr.dummy && ns == st->n.sym->ns))
goto fixup_contained;
+2009-04-28 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/39930
+ PR fortran/39931
+ * gfortran.dg/ambiguous_reference_2.f90: New.
+ * gfortran.dg/pointer_assign_7.f90: New.
+
2009-04-28 Nathan Froyd <froydnj@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
--- /dev/null
+! { dg-do compile }
+!
+! PR 39930: Bogus error: ambiguous reference
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module a1
+contains
+ subroutine myRoutine
+ end subroutine
+end module
+
+module a2
+contains
+ subroutine myRoutine
+ end subroutine
+end module
+
+module b
+contains
+
+ subroutine otherRoutine
+ use a1
+ use a2
+ end subroutine
+
+ subroutine myRoutine
+ end subroutine myRoutine ! this is not ambiguous !
+
+end module
+
+! { dg-final { cleanup-modules "a1 a2 b" } }
+
--- /dev/null
+! { dg-do compile }
+!
+! PR 39931: ICE on invalid Fortran 95 code (bad pointer assignment)
+!
+! Contributed by Thomas Orgis <thomas.orgis@awi.de>
+
+program point_of_no_return
+
+implicit none
+
+type face_t
+ integer :: bla
+end type
+
+integer, pointer :: blu
+type(face_t), pointer :: face
+
+allocate(face)
+allocate(blu)
+
+face%bla => blu ! { dg-error "Pointer assignment to non-POINTER" }
+
+end program
+