[Bug fortran/108453] [10/11/12/13 Regression] ICE in gfc_trans_use_stmts, at fortran/trans-decl.cc:5361 since r6-3704-g2b3f52a2d0fb22ba
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 27 22:20:44 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108453
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
Patch:
diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc
index 5e933c12931..f9393f189e0 100644
--- a/gcc/fortran/match.cc
+++ b/gcc/fortran/match.cc
@@ -5345,6 +5345,15 @@ gfc_match_common (void)
goto cleanup;
}
+ /* F2018:C8121: A variable-name shall not be a name made accessible
+ by use association. */
+ if (sym->attr.use_assoc)
+ {
+ gfc_error ("Symbol %qs at %C is USE associated from module %qs "
+ "and cannot occur in COMMON", sym->name, sym->module);
+ goto cleanup;
+ }
+
/* Deal with an optional array specification after the
symbol name. */
m = gfc_match_array_spec (&as, true, true);
More information about the Gcc-bugs
mailing list