https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115051
Bug ID: 115051 Summary: ICE: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 with -O -finstrument-functions-once -finline-stringops -fprofile-use Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: aarch64-unknown-linux-gnu Created attachment 58184 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58184&action=edit reduced testcase (from pr100519.c) Compiler output: $ aarch64-unknown-linux-gnu-gcc -O -finstrument-functions-once -finline-stringops -fprofile-use testcase.c -w during RTL pass: expand testcase.c: In function 'foo': testcase.c:11:1: internal compiler error: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 11 | } | ^ 0x864446 rtl_check_failed_type1(rtx_def const*, int, int, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:751 0x7b242f BLOCK_FOR_INSN(rtx_def*) /repo/gcc-trunk/gcc/rtl.h:1495 0x7b5d1c BLOCK_FOR_INSN(rtx_def*) /repo/gcc-trunk/gcc/emit-rtl.cc:4384 0x7b5d1c set_block_for_insn(rtx_insn*, basic_block_def*) /repo/gcc-trunk/gcc/rtl.h:1500 0x7b5d1c add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) /repo/gcc-trunk/gcc/emit-rtl.cc:4379 0xeaf750 emit_pattern_before_noloc /repo/gcc-trunk/gcc/emit-rtl.cc:4647 0xdd034d commit_one_edge_insertion(edge_def*) /repo/gcc-trunk/gcc/cfgrtl.cc:2106 0xdd5671 commit_edge_insertions() /repo/gcc-trunk/gcc/cfgrtl.cc:2168 0xdb5b4b execute /repo/gcc-trunk/gcc/cfgexpand.cc:6959 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. $ aarch64-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r15-380-20240511175912-g1b0919cd147-checking-yes-rtl-df-extra-nobootstrap-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/15.0.0/lto-wrapper Target: aarch64-unknown-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 --with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu --with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld --with-as=/usr/bin/aarch64-unknown-linux-gnu-as --enable-libsanitizer --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r15-380-20240511175912-g1b0919cd147-checking-yes-rtl-df-extra-nobootstrap-aarch64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240509 (experimental) (GCC)