https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68440

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #5 from janus at gcc dot gnu.org ---
Actually, since all of the attributes DUMMY, POINTER and ALLOCATABLE conflict
with the PARAMETER attribute, I guess the combination of CLASS and PARAMETER
can be forbidden completely.

Thus the second part of the patch becomes a bit simpler:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (Revision 241972)
+++ gcc/fortran/resolve.c       (Arbeitskopie)
@@ -14001,6 +14001,15 @@ resolve_fl_parameter (gfc_symbol *sym)
                 &sym->value->where);
       return false;
     }
+
+  /* F03:C509,C514.  */
+  if (sym->ts.type == BT_CLASS)
+    {
+      gfc_error ("CLASS variable %qs at %L cannot have the PARAMETER
attribute",
+                sym->name, &sym->declared_at);
+      return false;
+    }
+
   return true;
 }

Reply via email to