This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/78689] [7 Regression] ICE (segfault)
- From: "prathamesh3492 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2016 08:39:40 +0000
- Subject: [Bug middle-end/78689] [7 Regression] ICE (segfault)
- Auto-submitted: auto-generated
- References: <bug-78689-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78689
prathamesh3492 at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |prathamesh3492 at gcc dot gnu.org
--- Comment #1 from prathamesh3492 at gcc dot gnu.org ---
Can also be reproduced with:
struct e {
e() {
goto aj;
if (0)
aj:;
}
};
void f()
{
struct e x;
}
bug.cpp: In constructor ‘e::e()’:
bug.cpp:2:3: internal compiler error: Segmentation fault
e() {
^
0xdcbccf crash_signal
../../gcc/gcc/toplev.c:333
0xe02e63 main_block_label
../../gcc/gcc/tree-cfg.c:1380
0xe06759 cleanup_dead_labels()
../../gcc/gcc/tree-cfg.c:1563
0xe13c57 build_gimple_cfg
../../gcc/gcc/tree-cfg.c:237
0xe13c57 execute_build_cfg
../../gcc/gcc/tree-cfg.c:396
0xe13c57 execute
../../gcc/gcc/tree-cfg.c:432
The segfault seems to occur because gimplifier seems to remove
"aj" label, along with the dead if condition.
gimple dump for e::e():
e::e() (struct e * const this)
{
goto aj;
}
Perhaps an issue with gimplification ?
Thanks,
Prathamesh