[Bug fortran/85779] ICE in gfc_typename, at fortran/misc.c:156
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 14 19:52:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85779
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-05-14
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from kargl at gcc dot gnu.org ---
This fixes the problem. Watch for cut-n-paste corruption of tabs.
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c (revision 260235)
+++ gcc/fortran/decl.c (working copy)
@@ -9961,8 +9975,12 @@ gfc_match_derived_decl (void)
if (!gensym->attr.generic && gensym->ts.type != BT_UNKNOWN)
{
- gfc_error ("Derived type name %qs at %C already has a basic type "
- "of %s", gensym->name, gfc_typename (&gensym->ts));
+ if (gensym->ts.u.derived)
+ gfc_error ("Derived type name %qs at %C already has a basic type "
+ "of %s", gensym->name, gfc_typename (&gensym->ts));
+ else
+ gfc_error ("Derived type name %qs at %C already has a basic type",
+ gensym->name);
return MATCH_ERROR;
}
More information about the Gcc-bugs
mailing list