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/66545] ICE on using undefined parameter/variable values


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-06-15
                 CC|                            |tkoenig at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This fixes the complex part, the others need their own parts.

Index: primary.c
===================================================================
--- primary.c   (Revision 224450)
+++ primary.c   (Arbeitskopie)
@@ -1254,6 +1254,13 @@ match_sym_complex_part (gfc_expr **result)
       return MATCH_ERROR;
     }

+  if (sym->value == NULL)
+    {
+      gfc_error ("PARAMETER %qs is used at %C before its definition "
+                "is complete", sym->name);
+      return MATCH_ERROR;
+    }
+
   if (!gfc_numeric_ts (&sym->value->ts))
     {
       gfc_error ("Numeric PARAMETER required in complex constant at %C");


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