This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]