https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117223
Bug ID: 117223 Summary: ICE: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 with custom flags Product: gcc Version: 15.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: x86_64-pc-linux-gnu Created attachment 59392 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59392&action=edit reduced testcase This might need RTL checking enabled. Compiler output: $ x86_64-pc-linux-gnu-gcc -Os -fnon-call-exceptions -fprofile-generate -finline-stringops -mstringop-strategy=libcall -fno-tree-coalesce-vars testcase.c -Wno-psabi during RTL pass: expand testcase.c: In function 'foo': testcase.c:16:1: internal compiler error: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 16 | } | ^ 0x2c8a8be internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517 0x8388b7 rtl_check_failed_type1(rtx_def const*, int, int, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:751 0x78341b BLOCK_FOR_INSN(rtx_def*) /repo/gcc-trunk/gcc/rtl.h:1495 0x786b33 BLOCK_FOR_INSN(rtx_def*) /repo/gcc-trunk/gcc/emit-rtl.cc:4384 0x786b33 set_block_for_insn(rtx_insn*, basic_block_def*) /repo/gcc-trunk/gcc/rtl.h:1500 0x786b33 add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) /repo/gcc-trunk/gcc/emit-rtl.cc:4379 0x1135bf0 emit_pattern_before_noloc /repo/gcc-trunk/gcc/emit-rtl.cc:4647 0x1056dfd commit_one_edge_insertion(edge_def*) /repo/gcc-trunk/gcc/cfgrtl.cc:2106 0x105c121 commit_edge_insertions() /repo/gcc-trunk/gcc/cfgrtl.cc:2168 0x103c790 execute /repo/gcc-trunk/gcc/cfgexpand.cc:6971 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r15-4479-20241018160457-g3a12ac40325-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r15-4479-20241018160457-g3a12ac40325-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20241016 (experimental) (GCC)