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

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> ---
Created attachment 57128
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57128&action=edit
testcase triggering SIGSEGV at -O0

Slightly different testcase, triggers SIGSEGV at -O0 at a similar place:
$ x86_64-pc-linux-gnu-gcc testcase2.c -wrapper valgrind,-q
==8413== Invalid read of size 8
==8413==    at 0x271971F: var_to_partition (tree-ssa-live.h:163)
==8413==    by 0x271971F: lower_asm (gimple-lower-bitint.cc:5199)
==8413==    by 0x271971F: (anonymous
namespace)::bitint_large_huge::lower_stmt(gimple*)
(gimple-lower-bitint.cc:5236)
==8413==    by 0x271BB69: gimple_lower_bitint() (gimple-lower-bitint.cc:6534)
==8413==    by 0x13CBE7A: execute_one_pass(opt_pass*) (passes.cc:2646)
==8413==    by 0x13CC76F: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==8413==    by 0x13CC7A8: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==8413==    by 0xFCC675: expand (cgraphunit.cc:1842)
==8413==    by 0xFCC675: cgraph_node::expand() (cgraphunit.cc:1795)
==8413==    by 0xFCD589: output_in_order (cgraphunit.cc:2192)
==8413==    by 0xFCD589: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2396)
==8413==    by 0xFD0537: compile (cgraphunit.cc:2312)
==8413==    by 0xFD0537: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2584)
==8413==    by 0x150E111: compile_file() (toplev.cc:474)
==8413==    by 0xDE6E6B: do_compile (toplev.cc:2152)
==8413==    by 0xDE6E6B: toplev::main(int, char**) (toplev.cc:2308)
==8413==    by 0xDE864A: main (main.cc:39)
==8413==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==8413== 
during GIMPLE pass: bitintlower0
testcase2.c: In function 'bar':
testcase2.c:2:1: internal compiler error: Segmentation fault
    2 | bar(void)
      | ^~~
0x150dc2f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:317
0x271971f var_to_partition(_var_map*, tree_node*)
        /repo/gcc-trunk/gcc/tree-ssa-live.h:163
0x271971f lower_asm
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5199
0x271971f lower_stmt
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5236
0x271bb69 gimple_lower_bitint
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6534
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.

Reply via email to