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;
     }

Reply via email to