This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66545] ICE on using undefined parameter/variable values
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Jun 2015 20:12:27 +0000
- Subject: [Bug fortran/66545] ICE on using undefined parameter/variable values
- Auto-submitted: auto-generated
- References: <bug-66545-4 at http dot gcc dot gnu dot org/bugzilla/>
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");