https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98184

            Bug ID: 98184
           Summary: ICE in purge_dead_edges, at cfgrtl.c:3297
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to r8 :


$ cat z1.c
__attribute__((naked)) void f ();
__attribute__((naked)) void g (int x)
{
  __builtin_unwind_init ();
  __builtin_eh_return (x, f);
}


$ gcc-11-20201206 -c z1.c
$
$ gcc-11-20201206 -c z1.c -fsplit-stack
during RTL pass: pro_and_epilogue
z1.c: In function 'g':
z1.c:6:1: internal compiler error: in purge_dead_edges, at cfgrtl.c:3297
    6 | }
      | ^
0x771f55 purge_dead_edges(basic_block_def*)
        ../../gcc/cfgrtl.c:3297
0x13780e7 find_bb_boundaries
        ../../gcc/cfgbuild.c:589
0x13780e7 find_many_sub_basic_blocks(simple_bitmap_def*)
        ../../gcc/cfgbuild.c:672
0x8a8a12 thread_prologue_and_epilogue_insns()
        ../../gcc/function.c:6150
0x8a8c02 rest_of_handle_thread_prologue_and_epilogue
        ../../gcc/function.c:6506
0x8a8c02 execute
        ../../gcc/function.c:6582

---

No extra option needed when configured with --enable-checking=yes :

$ gcc-11-20201206 -c z1.c
z1.c: In function 'g':
z1.c:6:1: error: too many outgoing branch edges from bb 2
    6 | }
      | ^
during RTL pass: pro_and_epilogue
z1.c:6:1: internal compiler error: verify_flow_info failed
0x820884 verify_flow_info()
        ../../gcc/cfghooks.c:269
0x83f453 checking_verify_flow_info
        ../../gcc/cfghooks.h:212
0x83f453 commit_edge_insertions()
        ../../gcc/cfgrtl.c:2115
0x9cd289 thread_prologue_and_epilogue_insns()
        ../../gcc/function.c:6132
0x9cd342 rest_of_handle_thread_prologue_and_epilogue
        ../../gcc/function.c:6506
0x9cd342 execute
        ../../gcc/function.c:6582

Reply via email to