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

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
Here's a patch that allows the reduced testcase compile.

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 241667)
+++ gcc/fortran/resolve.c       (working copy)
@@ -11719,7 +11719,8 @@ resolve_fl_var_and_proc (gfc_symbol *sym
       /* Assume that use associated symbols were checked in the module ns.
         Class-variables that are associate-names are also something special
         and excepted from the test.  */
-      if (!sym->attr.class_ok && !sym->attr.use_assoc && !sym->assoc)
+      if (!sym->attr.class_ok && !sym->attr.use_assoc && !sym->attr.dummy
+         && !sym->assoc)
        {
          gfc_error ("CLASS variable %qs at %L must be dummy, allocatable "
                     "or pointer", sym->name, &sym->declared_at);

Reply via email to