[Bug fortran/66044] ICE on misplaced entry statement
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 7 15:33:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Last reconfirmed| |2015-05-07
CC| |kargl at gcc dot gnu.org
Resolution|DUPLICATE |---
Ever confirmed|0 |1
--- Comment #2 from kargl at gcc dot gnu.org ---
Confirmed.
This appears to be an intentional ICE as gfc_match_entry
explicitly calls gfc_internal_error. As this is a programmer
error and not an internal compiler error. The following
patch is probably the correct solution:
Index: decl.c
===================================================================
--- decl.c (revision 222869)
+++ decl.c (working copy)
@@ -5592,7 +5592,7 @@ gfc_match_entry (void)
"a contained subprogram");
break;
default:
- gfc_internal_error ("gfc_match_entry(): Bad state");
+ gfc_error ("Unexpected ENTRY statement at %C");
}
return MATCH_ERROR;
}
This then yields
% gfc6 -c po.f90
po.f90:4:7:
entry e
1
Error: Unexpected ENTRY statement at (1)
po.f90:10:13:
entry e
1
Error: Unexpected ENTRY statement at (1)
More information about the Gcc-bugs
mailing list