https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105243
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-05-16 Priority|P3 |P4 CC| |kargl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from kargl at gcc dot gnu.org --- This fixes the problem. Someone that regularly use git will need to commit it. diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index bd586e75008..6712efd6ec8 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -6283,6 +6283,15 @@ gfc_match_data_decl (void) goto cleanup; } + /* F2018:C708. */ + if (current_ts.type == BT_CLASS && current_attr.flavor == FL_PARAMETER) + { + gfc_error ("CLASS entity at %C shall be a dummy argument or have the " + "ALLOCATABLE or POINTER attribute."); + m = MATCH_ERROR; + goto cleanup; + } + ok: /* If we have an old-style character declaration, and no new-style attribute specifications, then there a comma is optional between