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

            Bug ID: 114000
           Summary: [11/12/13/14 Regression] ICE: in
                    force_nonfallthru_and_redirect, at cfgrtl.cc:1556 with
                    -O2 -freorder-blocks-and-partition -fPIC
                    -mexplicit-relocs
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: riscv64-unknown-linux-gnu

Created attachment 57465
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57465&action=edit
reduced testcase

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -O2 -freorder-blocks-and-partition -fPIC
-mexplicit-relocs testcase.c 
during RTL pass: pro_and_epilogue
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in force_nonfallthru_and_redirect, at
cfgrtl.cc:1556
   11 | }
      | ^
0xa05536 force_nonfallthru_and_redirect(edge_def*, basic_block_def*, rtx_def*)
        /repo/gcc-trunk/gcc/cfgrtl.cc:1556
0x1193ce3 redirect_edge_and_branch_force(edge_def*, basic_block_def*)
        /repo/gcc-trunk/gcc/cfghooks.cc:508
0x16d5bfa try_shrink_wrapping(edge_def**, rtx_insn*)
        /repo/gcc-trunk/gcc/shrink-wrap.cc:1019
0x1349c4b thread_prologue_and_epilogue_insns()
        /repo/gcc-trunk/gcc/function.cc:6057
0x134a5d2 rest_of_handle_thread_prologue_and_epilogue
        /repo/gcc-trunk/gcc/function.cc:6565
0x134a5d2 execute
        /repo/gcc-trunk/gcc/function.cc:6651
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9062-20240219114159-geb17bdc211a-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.1/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-isa-spec=2.2
--with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9062-20240219114159-geb17bdc211a-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240219 (experimental) (GCC)

Reply via email to