[Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Aug 14 13:21:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50070
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-08-14
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #6 from janus at gcc dot gnu.org 2011-08-14 13:10:57 UTC ---
Here is a preliminary patch which rejects the original test case:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 177744)
+++ gcc/fortran/resolve.c (working copy)
@@ -858,6 +858,12 @@ resolve_common_vars (gfc_symbol *sym, bool named_c
&csym->declared_at);
}
+ /* F08:C5100. */
+ if (csym->ts.type == BT_CHARACTER
+ && !gfc_is_constant_expr (csym->ts.u.cl->length))
+ gfc_error_now ("Automatic object %s at %L may not be in a COMMON block",
+ csym->name, &csym->declared_at);
+
if (csym->ts.type != BT_DERIVED)
continue;
More information about the Gcc-bugs
mailing list