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

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

$ x86_64-pc-linux-gnu-gcc -O2 testcase-O2.c -wrapper valgrind,-q
==16387== Invalid read of size 4
==16387==    at 0x114FEA7: phi_nodes_ptr (gimple.h:4700)
==16387==    by 0x114FEA7: gsi_start_phis (gimple-iterator.cc:935)
==16387==    by 0x114FEA7: gsi_for_stmt(gimple*) (gimple-iterator.cc:620)
==16387==    by 0x263223A: gimple_lower_bitint() (gimple-lower-bitint.cc:6695)
==16387==    by 0x13C4DCA: execute_one_pass(opt_pass*) (passes.cc:2646)
==16387==    by 0x13C56BF: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==16387==    by 0x13C56D1: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==16387==    by 0x13C56F8: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==16387==    by 0xFC60E5: expand (cgraphunit.cc:1842)
==16387==    by 0xFC60E5: cgraph_node::expand() (cgraphunit.cc:1795)
==16387==    by 0xFC742A: expand_all_functions (cgraphunit.cc:2025)
==16387==    by 0xFC742A: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2399)
==16387==    by 0xFC9FA7: compile (cgraphunit.cc:2312)
==16387==    by 0xFC9FA7: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2584)
==16387==    by 0x1506CF1: compile_file() (toplev.cc:473)
==16387==    by 0xDE3BFB: do_compile (toplev.cc:2150)
==16387==    by 0xDE3BFB: toplev::main(int, char**) (toplev.cc:2306)
==16387==    by 0xDE53DA: main (main.cc:39)
==16387==  Address 0x50 is not stack'd, malloc'd or (recently) free'd
==16387== 
during GIMPLE pass: bitintlower
testcase-O2.c: In function 'foo':
testcase-O2.c:4:1: internal compiler error: Segmentation fault
    4 | foo(void)
      | ^~~
0x150680f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:316
0x114fea7 phi_nodes_ptr(basic_block_def*)
        /repo/gcc-trunk/gcc/gimple.h:4700
0x114fea7 gsi_start_phis(basic_block_def*)
        /repo/gcc-trunk/gcc/gimple-iterator.cc:935
0x114fea7 gsi_for_stmt(gimple*)
        /repo/gcc-trunk/gcc/gimple-iterator.cc:620
0x263223a gimple_lower_bitint
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6695
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