public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66044] New: ICE on misplaced entry statement
@ 2015-05-07 7:53 gerhard.steinmetz.fortran@t-online.de
2015-05-07 12:52 ` [Bug fortran/66044] " dominiq at lps dot ens.fr
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-07 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
Bug ID: 66044
Summary: ICE on misplaced entry statement
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
Some code snippets :
---
entry e; end
---
subroutine p
end
entry e
end
---
program p
type t
contains
entry e
end type
end
---
Prints, respectivly :
f951: internal compiler error: gfc_match_entry(): Bad state
Tested with gfortran 5.1.1 on SUSE Linux 13.2 (64 bit).
Kind regards.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66044] ICE on misplaced entry statement
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
@ 2015-05-07 12:52 ` dominiq at lps dot ens.fr
2015-05-07 15:33 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-05-07 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
It looks like a duplicate of pr50539.
*** This bug has been marked as a duplicate of bug 50539 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66044] ICE on misplaced entry statement
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
2015-05-07 12:52 ` [Bug fortran/66044] " dominiq at lps dot ens.fr
@ 2015-05-07 15:33 ` kargl at gcc dot gnu.org
2015-05-18 22:07 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-07 15:33 UTC (permalink / raw)
To: gcc-bugs
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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66044] ICE on misplaced entry statement
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
2015-05-07 12:52 ` [Bug fortran/66044] " dominiq at lps dot ens.fr
2015-05-07 15:33 ` kargl at gcc dot gnu.org
@ 2015-05-18 22:07 ` kargl at gcc dot gnu.org
2015-05-19 17:47 ` kargl at gcc dot gnu.org
2015-05-19 18:02 ` kargl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-18 22:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
--- Comment #3 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon May 18 22:06:48 2015
New Revision: 223321
URL: https://gcc.gnu.org/viewcvs?rev=223321&root=gcc&view=rev
Log:
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66044
* decl.c(gfc_match_entry): Change a gfc_internal_error() into
a gfc_error()
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66044
* gfortran.dg/entry_21.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/entry_21.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66044] ICE on misplaced entry statement
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
` (2 preceding siblings ...)
2015-05-18 22:07 ` kargl at gcc dot gnu.org
@ 2015-05-19 17:47 ` kargl at gcc dot gnu.org
2015-05-19 18:02 ` kargl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-19 17:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Tue May 19 17:47:12 2015
New Revision: 223405
URL: https://gcc.gnu.org/viewcvs?rev=223405&root=gcc&view=rev
Log:
2015-05-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66044
* decl.c(gfc_match_entry): Change a gfc_internal_error() into
a gfc_error()
2015-05-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66044
* gfortran.dg/entry_21.f90: New test.
Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/entry_21.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66044] ICE on misplaced entry statement
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
` (3 preceding siblings ...)
2015-05-19 17:47 ` kargl at gcc dot gnu.org
@ 2015-05-19 18:02 ` kargl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-19 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66044
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.2
--- Comment #5 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch. Thanks for the bug report.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-19 18:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 7:53 [Bug fortran/66044] New: ICE on misplaced entry statement gerhard.steinmetz.fortran@t-online.de
2015-05-07 12:52 ` [Bug fortran/66044] " dominiq at lps dot ens.fr
2015-05-07 15:33 ` kargl at gcc dot gnu.org
2015-05-18 22:07 ` kargl at gcc dot gnu.org
2015-05-19 17:47 ` kargl at gcc dot gnu.org
2015-05-19 18:02 ` kargl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).