Bug 91430 - ICE in curr_insn_transform, at lra-constraints.c:3962
Summary: ICE in curr_insn_transform, at lra-constraints.c:3962
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 9.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, ra
Depends on:
Blocks:
 
Reported: 2019-08-13 00:43 UTC by Peter Wang
Modified: 2019-08-14 14:40 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work: 10.0
Known to fail:
Last reconfirmed: 2019-08-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.