[Bug target/107540] New: [13 Regression] ICE: SIGSEGV in memory_operand(rtx_def*, machine_mode) (recog.cc:1834) with -flive-range-shrinkage

zsojka at seznam dot cz gcc-bugzilla@gcc.gnu.org
Sun Nov 6 08:28:34 GMT 2022


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

            Bug ID: 107540
           Summary: [13 Regression] ICE: SIGSEGV in
                    memory_operand(rtx_def*, machine_mode) (recog.cc:1834)
                    with -flive-range-shrinkage
           Product: gcc
           Version: 13.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: x86_64-pc-linux-gnu

Created attachment 53838
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53838&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -flive-range-shrinkage -mavx testcase.c -wrapper
valgrind,-q
==15852== Invalid read of size 2
==15852==    at 0x1328AAA: memory_operand(rtx_def*, machine_mode)
(recog.cc:1834)
==15852==    by 0x1C0A905: get_attr_memory(rtx_insn*) (i386.md:5270)
==15852==    by 0x202F5B7: insn_default_latency_generic(rtx_insn*)
(i386.md:19121)
==15852==    by 0x2485921: insn_sched_cost(rtx_insn*) (haifa-sched.cc:1421)
==15852==    by 0x2489FE2: dep_cost_1(_dep*, unsigned int)
(haifa-sched.cc:1474)
==15852==    by 0x248BCD1: dep_cost (haifa-sched.cc:1510)
==15852==    by 0x248BCD1: priority(rtx_insn*, bool) [clone .part.0]
(haifa-sched.cc:1661)
==15852==    by 0x248C5D2: priority (haifa-sched.cc:1593)
==15852==    by 0x248C5D2: set_priorities(rtx_insn*, rtx_insn*)
(haifa-sched.cc:7166)
==15852==    by 0x137D6A2: compute_priorities() (sched-rgn.cc:3025)
==15852==    by 0x13803D5: schedule_region (sched-rgn.cc:3139)
==15852==    by 0x13803D5: schedule_insns() [clone .part.0] (sched-rgn.cc:3527)
==15852==    by 0x13809FB: schedule_insns (sched-rgn.cc:3513)
==15852==    by 0x13809FB: rest_of_handle_live_range_shrinkage
(sched-rgn.cc:3715)
==15852==    by 0x13809FB: (anonymous
namespace)::pass_live_range_shrinkage::execute(function*) (sched-rgn.cc:3802)
==15852==    by 0x12D855A: execute_one_pass(opt_pass*) (passes.cc:2644)
==15852==    by 0x12D8E3F: execute_pass_list_1(opt_pass*) (passes.cc:2753)
==15852==  Address 0xabababababababab is not stack'd, malloc'd or (recently)
free'd
==15852== 
during RTL pass: lr_shrinkage
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: Segmentation fault
    9 | }
      | ^
0x13e1bbf crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:314
0x1328aaa memory_operand(rtx_def*, machine_mode)
        /repo/gcc-trunk/gcc/recog.cc:1834
0x1c0a905 get_attr_memory(rtx_insn*)
        /repo/gcc-trunk/gcc/config/i386/i386.md:5270
0x202f5b7 insn_default_latency_generic(rtx_insn*)
        /repo/gcc-trunk/gcc/config/i386/i386.md:19121
0x2485921 insn_sched_cost(rtx_insn*)
        /repo/gcc-trunk/gcc/haifa-sched.cc:1421
0x2489fe2 dep_cost_1(_dep*, unsigned int)
        /repo/gcc-trunk/gcc/haifa-sched.cc:1474
0x248bcd1 dep_cost(_dep*)
        /repo/gcc-trunk/gcc/haifa-sched.cc:1510
0x248bcd1 priority
        /repo/gcc-trunk/gcc/haifa-sched.cc:1661
0x248c5d2 priority
        /repo/gcc-trunk/gcc/haifa-sched.cc:1593
0x248c5d2 set_priorities(rtx_insn*, rtx_insn*)
        /repo/gcc-trunk/gcc/haifa-sched.cc:7166
0x137d6a2 compute_priorities()
        /repo/gcc-trunk/gcc/sched-rgn.cc:3025
0x13803d5 schedule_region
        /repo/gcc-trunk/gcc/sched-rgn.cc:3139
0x13803d5 schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.cc:3527
0x13809fb schedule_insns()
        /repo/gcc-trunk/gcc/sched-rgn.cc:3513
0x13809fb rest_of_handle_live_range_shrinkage
        /repo/gcc-trunk/gcc/sched-rgn.cc:3715
0x13809fb execute
        /repo/gcc-trunk/gcc/sched-rgn.cc:3802
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 -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-3702-20221106155652-g3628025ac60-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/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-r13-3702-20221106155652-g3628025ac60-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20221104 (experimental) (GCC)


More information about the Gcc-bugs mailing list