[Bug fortran/85780] ICE in resolve_fl_procedure, at fortran/resolve.c:12504
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 14 20:18:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85780
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-05-14
CC| |kargl at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
Paul,
The ICE can be fixed by checking for a NULL pointer.
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 260235)
+++ gcc/fortran/resolve.c (working copy)
@@ -12501,7 +12501,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
while (curr_arg != NULL)
{
/* Skip implicitly typed dummy args here. */
- if (curr_arg->sym->attr.implicit_type == 0)
+ if (curr_arg->sym && curr_arg->sym->attr.implicit_type == 0)
if (!gfc_verify_c_interop_param (curr_arg->sym))
/* If something is found to fail, record the fact so we
can mark the symbol for the procedure as not being
HOwever, I think we then have an accepts invalid as an alternate
return takes a label. If I look at gfc_match_formal_arglist in
decl.c, it looks like your PDT work may have touched the area
that should issue an error.
81764 dnovillo if (gfc_match_char ('*') == MATCH_YES)
197389 janus {
197389 janus sym = NULL;
255311 pault if (!typeparam && !gfc_notify_std (GFC_STD_F95_OBS,
255311 pault "Alternate-return argument at
%C"))
197389 janus {
197389 janus m = MATCH_ERROR;
197389 janus goto cleanup;
197389 janus }
255311 pault else if (typeparam)
255311 pault gfc_error_now ("A parameter name is required at
%C");
197389 janus }
Do you have any insights?
More information about the Gcc-bugs
mailing list