https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112411
Bug ID: 112411 Summary: ICE: SIGSEGV with --param=min-nondebug-insn-uid=2147483647 on powerpc64le-unknown-linux-gnu Product: gcc Version: 14.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: powerpc64le-unknown-linux-gnu Created attachment 56518 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56518&action=edit reduced testcase Compiler output: $ powerpc64le-unknown-linux-gnu-gcc --param=min-nondebug-insn-uid=2147483647 testcase.c -wrapper valgrind,-q,--num-callers=100 ==18938== Invalid read of size 4 ==18938== at 0xC9A477: get_attr_length_1(rtx_insn*, int (*)(rtx_insn*)) (final.cc:353) ==18938== by 0x1489717: rs6000_insn_cost (rs6000.cc:22634) ==18938== by 0x1489717: rs6000_insn_cost(rtx_insn*, bool) (rs6000.cc:22614) ==18938== by 0xC6D69E: canonicalize_comparison(machine_mode, rtx_code*, rtx_def**) (expmed.cc:6344) ==18938== by 0xC6DD71: emit_store_flag_1(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int, machine_mode) (expmed.cc:5629) ==18938== by 0xC6E2A7: emit_store_flag(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int) (expmed.cc:6037) ==18938== by 0xC6F26A: emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int) (expmed.cc:6177) ==18938== by 0xC89B8F: convert_mode_scalar(rtx_def*, rtx_def*, int) (expr.cc:689) ==18938== by 0xC7E70D: expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) (expr.cc:9396) ==18938== by 0xB4A2F0: expand_gimple_stmt_1 (cfgexpand.cc:3983) ==18938== by 0xB4A2F0: expand_gimple_stmt(gimple*) (cfgexpand.cc:4044) ==18938== by 0xB5067E: expand_gimple_basic_block(basic_block_def*, bool) (cfgexpand.cc:6100) ==18938== by 0xB5235E: (anonymous namespace)::pass_expand::execute(function*) (cfgexpand.cc:6835) ==18938== by 0xF7B62A: execute_one_pass(opt_pass*) (passes.cc:2641) ==18938== by 0xF7BF0F: execute_pass_list_1(opt_pass*) (passes.cc:2750) ==18938== by 0xF7BF48: execute_pass_list(function*, opt_pass*) (passes.cc:2761) ==18938== by 0xB92FF5: expand (cgraphunit.cc:1841) ==18938== by 0xB92FF5: cgraph_node::expand() (cgraphunit.cc:1794) ==18938== by 0xB93F09: output_in_order (cgraphunit.cc:2191) ==18938== by 0xB93F09: symbol_table::compile() [clone .part.0] (cgraphunit.cc:2395) ==18938== by 0xB96EA7: compile (cgraphunit.cc:2311) ==18938== by 0xB96EA7: symbol_table::finalize_compilation_unit() (cgraphunit.cc:2583) ==18938== by 0x10B3D62: compile_file() (toplev.cc:473) ==18938== by 0x9B8903: do_compile (toplev.cc:2129) ==18938== by 0x9B8903: toplev::main(int, char**) (toplev.cc:2285) ==18938== by 0x9BA00A: main (main.cc:39) ==18938== Address 0xfffffffe0000001c is not stack'd, malloc'd or (recently) free'd ==18938== during RTL pass: expand testcase.c: In function 'foo': testcase.c:7:5: internal compiler error: Segmentation fault 7 | i += j; | ^~ $ powerpc64le-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-powerpc64le/bin/powerpc64le-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-5141-20231106022717-g1a55724f787-checking-yes-rtl-df-extra-powerpc64le/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/14.0.0/lto-wrapper Target: powerpc64le-unknown-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --with-sysroot=/usr/powerpc64le-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=powerpc64le-unknown-linux-gnu --with-ld=/usr/bin/powerpc64le-unknown-linux-gnu-ld --with-as=/usr/bin/powerpc64le-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r14-5141-20231106022717-g1a55724f787-checking-yes-rtl-df-extra-powerpc64le Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231106 (experimental) (GCC)