https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94530
Bug ID: 94530 Summary: [9/10 Regression] ICE: SIGSEGV in rhs_regno (rtl.h:1924) with -Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large Product: gcc Version: 10.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: aarch64-unknown-linux-gnu Created attachment 48240 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48240&action=edit reduced testcase Compiler output: $ aarch64-unknown-linux-gnu-gcc -Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large testcase.c -wrapper valgrind,-q,--track-origins=yes ==19355== Use of uninitialised value of size 8 ==19355== at 0x14B84CD: rhs_regno (rtl.h:1924) ==19355== by 0x14B84CD: valid_src_p (falkor-tag-collision-avoidance.c:541) ==19355== by 0x14B84CD: get_load_info(rtx_insn*, loop*, rtx_def**, rtx_def**, rtx_def**, bool*, bool*) (falkor-tag-collision-avoidance.c:641) ==19355== by 0x14B98D5: record_loads (falkor-tag-collision-avoidance.c:771) ==19355== by 0x14B98D5: execute_tag_collision_avoidance() (falkor-tag-collision-avoidance.c:824) ==19355== by 0x14BA508: pass_tag_collision_avoidance::execute(function*) (falkor-tag-collision-avoidance.c:871) ==19355== by 0xFD3B7E: execute_one_pass(opt_pass*) (passes.c:2502) ==19355== by 0xFD432F: execute_pass_list_1(opt_pass*) (passes.c:2590) ==19355== by 0xFD4341: execute_pass_list_1(opt_pass*) (passes.c:2591) ==19355== by 0xFD4341: execute_pass_list_1(opt_pass*) (passes.c:2591) ==19355== by 0xFD4368: execute_pass_list(function*, opt_pass*) (passes.c:2601) ==19355== by 0xC2E14B: cgraph_node::expand() (cgraphunit.c:2299) ==19355== by 0xC2F1EF: expand_all_functions (cgraphunit.c:2470) ==19355== by 0xC2F1EF: symbol_table::compile() [clone .part.0] (cgraphunit.c:2820) ==19355== by 0xC3195C: compile (cgraphunit.c:2733) ==19355== by 0xC3195C: symbol_table::finalize_compilation_unit() (cgraphunit.c:3000) ==19355== by 0x10D263A: compile_file() (toplev.c:483) ==19355== Uninitialised value was created by a stack allocation ==19355== at 0x14B829D: get_load_info(rtx_insn*, loop*, rtx_def**, rtx_def**, rtx_def**, bool*, bool*) (falkor-tag-collision-avoidance.c:592) ==19355== ==19355== Invalid read of size 2 ==19355== at 0x14B84CD: rhs_regno (rtl.h:1924) ==19355== by 0x14B84CD: valid_src_p (falkor-tag-collision-avoidance.c:541) ==19355== by 0x14B84CD: get_load_info(rtx_insn*, loop*, rtx_def**, rtx_def**, rtx_def**, bool*, bool*) (falkor-tag-collision-avoidance.c:641) ==19355== by 0x14B98D5: record_loads (falkor-tag-collision-avoidance.c:771) ==19355== by 0x14B98D5: execute_tag_collision_avoidance() (falkor-tag-collision-avoidance.c:824) ==19355== by 0x14BA508: pass_tag_collision_avoidance::execute(function*) (falkor-tag-collision-avoidance.c:871) ==19355== by 0xFD3B7E: execute_one_pass(opt_pass*) (passes.c:2502) ==19355== by 0xFD432F: execute_pass_list_1(opt_pass*) (passes.c:2590) ==19355== by 0xFD4341: execute_pass_list_1(opt_pass*) (passes.c:2591) ==19355== by 0xFD4341: execute_pass_list_1(opt_pass*) (passes.c:2591) ==19355== by 0xFD4368: execute_pass_list(function*, opt_pass*) (passes.c:2601) ==19355== by 0xC2E14B: cgraph_node::expand() (cgraphunit.c:2299) ==19355== by 0xC2F1EF: expand_all_functions (cgraphunit.c:2470) ==19355== by 0xC2F1EF: symbol_table::compile() [clone .part.0] (cgraphunit.c:2820) ==19355== by 0xC3195C: compile (cgraphunit.c:2733) ==19355== by 0xC3195C: symbol_table::finalize_compilation_unit() (cgraphunit.c:3000) ==19355== by 0x10D263A: compile_file() (toplev.c:483) ==19355== Address 0x1 is not stack'd, malloc'd or (recently) free'd ==19355== during RTL pass: tag_collision_avoidance testcase.c: In function 'foo': testcase.c:6:1: internal compiler error: Segmentation fault 6 | } | ^ Please submit a full bug report, with preprocessed source if appropriate. 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-r10-7607-20200407213012-gc23c899aedf-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/10.0.1/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 --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 --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r10-7607-20200407213012-gc23c899aedf-checking-yes-rtl-df-extra-aarch64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200407 (experimental) (GCC)