public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455
@ 2020-06-09 17:33 gscfq@t-online.de
2020-06-09 17:41 ` [Bug fortran/95613] " dominiq at lps dot ens.fr
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2020-06-09 17:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
Bug ID: 95613
Summary: ICE in main_block_label, at tree-cfg.c:1455
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.f90
program p
select case (0)
2 end select
goto 2
end
$ cat z2.f90
program p
select case (0)
2 end select
stop
goto 2
end
$ cat z3.f90
program p
select case (0)
case (2:1)
2 stop
end select
goto 2
end
$ cat z4.f90
program p
select case (0)
case (2:1)
2 stop
case (3)
goto 2
end select
end
$ gfortran-11-20200607 -c z1.f90
z1.f90:3:2:
3 | 2 end select
| 1
4 | goto 2
| 2
Warning: Legacy Extension: Label at (1) is not in the same block as the GOTO
statement at (2)
during GIMPLE pass: cfg
z1.f90:1:0:
1 | program p
|
internal compiler error: Segmentation fault
0xbc593f crash_signal
../../gcc/toplev.c:328
0xbf6d3b main_block_label
../../gcc/tree-cfg.c:1455
0xbf7271 cleanup_dead_labels()
../../gcc/tree-cfg.c:1639
0xc0186b build_gimple_cfg
../../gcc/tree-cfg.c:238
0xc0186b execute_build_cfg
../../gcc/tree-cfg.c:369
0xc0186b execute
../../gcc/tree-cfg.c:405
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
@ 2020-06-09 17:41 ` dominiq at lps dot ens.fr
2020-06-10 5:48 ` kargl at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-06-09 17:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-06-09
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
2020-06-09 17:41 ` [Bug fortran/95613] " dominiq at lps dot ens.fr
@ 2020-06-10 5:48 ` kargl at gcc dot gnu.org
2020-07-01 19:28 ` gscfq@t-online.de
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-06-10 5:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Priority|P3 |P4
--- Comment #2 from kargl at gcc dot gnu.org ---
Fortran 66 has not been the standard for 54 years. Time to enforce numbered
constraints in the Fortran 2018 (and older) standard.
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 280157)
+++ gcc/fortran/resolve.c (working copy)
@@ -10193,12 +10200,16 @@ resolve_branch (gfc_st_label *label, gfc_code *code)
return;
}
- /* The label is not in an enclosing block, so illegal. This was
- allowed in Fortran 66, so we allow it as extension. No
- further checks are necessary in this case. */
- gfc_notify_std (GFC_STD_LEGACY, "Label at %L is not in the same block "
- "as the GOTO statement at %L", &label->where,
- &code->loc);
+ /* F2018: C1169 (R1157) The label shall be the statement label of a
+ branch target statement that appears in the same inclusive scope
+ as the goto-stmt.
+
+ F2018: C1170 (R1158) Each label in label-list shall be the statement
+ label of a branch target statement that appears in the same inclusive
+ scope as the computed-goto-stmt. */
+
+ gfc_error ("Label at %L is not in the same block as the GOTO statement "
+ "at %L", &label->where, &code->loc);
return;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
2020-06-09 17:41 ` [Bug fortran/95613] " dominiq at lps dot ens.fr
2020-06-10 5:48 ` kargl at gcc dot gnu.org
@ 2020-07-01 19:28 ` gscfq@t-online.de
2023-05-30 4:53 ` kargl at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2020-07-01 19:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
--- Comment #3 from G. Steinmetz <gscfq@t-online.de> ---
And for the sake of completeness, with another incarnation of goto :
$ cat zz2.f90 # etc.
program p
select case (0)
2 end select
stop
call s(*2)
end
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
` (2 preceding siblings ...)
2020-07-01 19:28 ` gscfq@t-online.de
@ 2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:53 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-05-30 4:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
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 ---
Created attachment 55207
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55207&action=edit
testcase 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
` (3 preceding siblings ...)
2023-05-30 4:53 ` kargl at gcc dot gnu.org
@ 2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:53 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-05-30 4:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
--- Comment #5 from kargl at gcc dot gnu.org ---
Created attachment 55208
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55208&action=edit
testcase 2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
` (4 preceding siblings ...)
2023-05-30 4:53 ` kargl at gcc dot gnu.org
@ 2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:54 ` kargl at gcc dot gnu.org
2023-05-30 4:54 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-05-30 4:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
--- Comment #6 from kargl at gcc dot gnu.org ---
Created attachment 55209
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55209&action=edit
testcase 3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
` (5 preceding siblings ...)
2023-05-30 4:53 ` kargl at gcc dot gnu.org
@ 2023-05-30 4:54 ` kargl at gcc dot gnu.org
2023-05-30 4:54 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-05-30 4:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
--- Comment #7 from kargl at gcc dot gnu.org ---
Created attachment 55210
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55210&action=edit
testcase 4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
` (6 preceding siblings ...)
2023-05-30 4:54 ` kargl at gcc dot gnu.org
@ 2023-05-30 4:54 ` kargl at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-05-30 4:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613
--- Comment #8 from kargl at gcc dot gnu.org ---
Created attachment 55211
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55211&action=edit
patch that fixes bug
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-05-30 4:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 17:33 [Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455 gscfq@t-online.de
2020-06-09 17:41 ` [Bug fortran/95613] " dominiq at lps dot ens.fr
2020-06-10 5:48 ` kargl at gcc dot gnu.org
2020-07-01 19:28 ` gscfq@t-online.de
2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:53 ` kargl at gcc dot gnu.org
2023-05-30 4:54 ` kargl at gcc dot gnu.org
2023-05-30 4:54 ` 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).