[Bug fortran/58355] [F03] ICE with TYPE, EXTENDS before parent TYPE defined
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 15 21:53:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58355
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org
--- Comment #2 from janus at gcc dot gnu.org ---
Draft patch:
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c (revision 202599)
+++ gcc/fortran/decl.c (working copy)
@@ -7390,6 +7390,7 @@ syntax:
/* Check a derived type that is being extended. */
+
static gfc_symbol*
check_extended_derived_type (char *name)
{
@@ -7401,14 +7402,15 @@ check_extended_derived_type (char *name)
return NULL;
}
+ extended = gfc_find_dt_in_generic (extended);
+
+ /* F08:C428. */
if (!extended)
{
- gfc_error ("No such symbol in TYPE definition at %C");
+ gfc_error ("Symbol '%s' at %C has not been previously defined", name);
return NULL;
}
- extended = gfc_find_dt_in_generic (extended);
-
if (extended->attr.flavor != FL_DERIVED)
{
gfc_error ("'%s' in EXTENDS expression at %C is not a "
More information about the Gcc-bugs
mailing list