diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dfaeeec31ea..1d2edde95a3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2010-06-19 Janus Weil + + PR fortran/44584 + * resolve.c (resolve_fl_derived): Reverse ordering of conditions + to avoid ICE. + 2010-06-18 Tobias Burnus PR fortran/44556 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 0951498e2db..2f05b23b02f 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -10892,7 +10892,7 @@ resolve_fl_derived (gfc_symbol *sym) c->ts.u.cl = cl; } } - else if (c->ts.interface->name[0] != '\0' && !sym->attr.vtype) + else if (!sym->attr.vtype && c->ts.interface->name[0] != '\0') { gfc_error ("Interface '%s' of procedure pointer component " "'%s' at %L must be explicit", c->ts.interface->name, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f6ad4b1dc3..0d35274cb2e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-06-19 Janus Weil + + PR fortran/44584 + * gfortran.dg/typebound_proc_15.f03: Modified. + 2010-06-19 Richard Earnshaw PR target/44072 diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 index a8a2ce7e87a..37907b3f4df 100644 --- a/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 @@ -12,7 +12,7 @@ implicit none type :: t contains procedure :: foo - procedure :: bar, baz { dg-error "PROCEDURE list" } + procedure :: bar, baz ! { dg-error "PROCEDURE list" } end type contains @@ -21,6 +21,14 @@ contains class(t) :: this end subroutine + subroutine bar (this) + class(t) :: this + end subroutine + + subroutine baz (this) + class(t) :: this + end subroutine + end ! { dg-final { cleanup-modules "m" } }