https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113699
Bug ID: 113699 Summary: during GIMPLE pass: bitintlower ICE: SIGSEGV in var_to_partition (tree-ssa-live.h:163) with _BitInt() used in __asm__ Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz CC: jakub at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 57276 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57276&action=edit reduced testcase (from gcc.target/i386/pr41985.c) Compiler output: $ x86_64-pc-linux-gnu-gcc testcase.c -wrapper valgrind,-q ==30321== Invalid read of size 8 ==30321== at 0x271DC7F: var_to_partition (tree-ssa-live.h:163) ==30321== by 0x271DC7F: lower_asm (gimple-lower-bitint.cc:5203) ==30321== by 0x271DC7F: (anonymous namespace)::bitint_large_huge::lower_stmt(gimple*) (gimple-lower-bitint.cc:5240) ==30321== by 0x2720009: gimple_lower_bitint() (gimple-lower-bitint.cc:6564) ==30321== by 0x13CDCBA: execute_one_pass(opt_pass*) (passes.cc:2646) ==30321== by 0x13CE5AF: execute_pass_list_1(opt_pass*) (passes.cc:2755) ==30321== by 0x13CE5E8: execute_pass_list(function*, opt_pass*) (passes.cc:2766) ==30321== by 0xFCDC05: expand (cgraphunit.cc:1843) ==30321== by 0xFCDC05: cgraph_node::expand() (cgraphunit.cc:1796) ==30321== by 0xFCEB19: output_in_order (cgraphunit.cc:2193) ==30321== by 0xFCEB19: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2397) ==30321== by 0xFD1AC7: compile (cgraphunit.cc:2313) ==30321== by 0xFD1AC7: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2585) ==30321== by 0x150FF61: compile_file() (toplev.cc:474) ==30321== by 0xDE840B: do_compile (toplev.cc:2152) ==30321== by 0xDE840B: toplev::main(int, char**) (toplev.cc:2308) ==30321== by 0xDE9BEA: main (main.cc:39) ==30321== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==30321== during GIMPLE pass: bitintlower0 testcase.c: In function 'foo': testcase.c:2:1: internal compiler error: Segmentation fault 2 | foo (void) | ^~~ 0x150fa7f crash_signal /repo/gcc-trunk/gcc/toplev.cc:317 0x271dc7f var_to_partition(_var_map*, tree_node*) /repo/gcc-trunk/gcc/tree-ssa-live.h:163 0x271dc7f lower_asm /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5203 0x271dc7f lower_stmt /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5240 0x2720009 gimple_lower_bitint /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6564 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 COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-8665-20240131161256-g3fed1609f61-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/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 --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r14-8665-20240131161256-g3fed1609f61-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240131 (experimental) (GCC)