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: [email protected]
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