This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/78689] [7 Regression] ICE (segfault)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]