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: "kargl 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:28:25 +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
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #3)
> 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");
I have
if (!sym->value)
goto error;
which leads to the same error.