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

            Bug ID: 121843
           Summary: [11 - 16 Regression] Powerpc64: trigger error at
                    -O1/O2/O3 during RTL pass: pro_and_epilogue
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Testcase:
#include <stdint.h>
int32_t a() {
b:
  asm goto("" : : : : c, d);
  for (;;)
    ;
c:
  asm("" ::: "23");
  asm goto("" : : : : b);
d:
  asm("" ::: "20");
}

Output:
during RTL pass: pro_and_epilogue
<source>: In function 'a':
<source>:12:1: internal compiler error: Segmentation fault
   12 | }
      | ^
0x21c7791 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x21bc6bf internal_error(char const*, ...)
        ???:0
0xf4c9d0 returnjump_p(rtx_insn const*)
        ???:0
0xbb6600 commit_one_edge_insertion(edge_def*)
        ???:0
0xbbb6d9 commit_edge_insertions()
        ???:0
0xd4cebe thread_prologue_and_epilogue_insns()
        ???:0

Reproducer: https://godbolt.org/z/zKGdqsf3e

Reply via email to