Bug 91430

Summary: [9 Regression] ICE in curr_insn_transform, at lra-constraints.c:3962
Product: gcc Reporter: Peter Wang <novalazy>
Component: rtl-optimizationAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: vmakarov
Priority: P3 Keywords: ice-on-valid-code, ra
Version: 9.1.0   
Target Milestone: 9.5   
Host: Target: x86_64-*-*
Build: Known to work: 10.0
Known to fail: Last reconfirmed: 2019-08-13 00:00:00

Description Peter Wang 2019-08-13 00:43:49 UTC
Hi, the following test case hits an ICE in gcc 9.1.0 on x86_64.

% cat test.c
register unsigned long a __asm__("r14");
register unsigned long b __asm__("r15");

void test(void)
{
    b = a << 4;
}


% gcc -O1 -c test.c
test.c: In function 'test':
test.c:7:1: error: unable to generate reloads for:
    7 | }
      | ^
(insn 6 5 9 2 (parallel [
            (set (reg/v:DI 43 r15 [ b ])
                (ashift:DI (reg/v:DI 42 r14 [ a ])
                    (const_int 4 [0x4])))
            (clobber (reg:CC 17 flags))
        ]) "test.c":6:11 520 {*ashldi3_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
during RTL pass: reload
test.c:7:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3962


% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
Comment 1 Martin Liška 2019-08-13 07:24:57 UTC
Fixed on trunk with r273357, thus probably a dup of PR91102.
Vladimir?
Comment 2 Vladimir Makarov 2019-08-14 14:40:43 UTC
(In reply to Martin Liška from comment #1)
> Fixed on trunk with r273357, thus probably a dup of PR91102.
> Vladimir?

Yes, it is definitely a dup.
Comment 3 Andrew Pinski 2021-09-16 00:00:26 UTC
Dup of bug 91102.

*** This bug has been marked as a duplicate of bug 91102 ***