Bug 90280 - [9/10 Regression] ICE: in lra_assign, at lra-assigns.c:1650 with -O -fno-dce -fno-forward-propagate -fno-omit-frame-pointer
Summary: [9/10 Regression] ICE: in lra_assign, at lra-assigns.c:1650 with -O -fno-dce ...
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: 9.3
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2019-04-29 14:33 UTC by Zdenek Sojka
Modified: 2020-02-28 04:40 UTC (History)
3 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: armv7a-hardfloat-linux-gnueabi
Build:
Known to work: 8.3.1
Known to fail: 10.0, 9.0
Last reconfirmed:


Attachments
reduced testcase (142 bytes, text/plain)
2019-04-29 14:33 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2019-04-29 14:33:29 UTC
Created attachment 46263 [details]
reduced testcase

Compiler output:
$ armv7a-hardfloat-linux-gnueabi-gcc -O -fno-dce -fno-forward-propagate -fno-omit-frame-pointer testcase.c 
during RTL pass: reload
testcase.c: In function 'foo':
testcase.c:13:1: internal compiler error: in lra_assign, at lra-assigns.c:1650
   13 | }
      | ^
0xc3093a lra_assign(bool&)
        /repo/gcc-trunk/gcc/lra-assigns.c:1650
0xc2a5ca lra(_IO_FILE*)
        /repo/gcc-trunk/gcc/lra.c:2534
0xbd5369 do_reload
        /repo/gcc-trunk/gcc/ira.c:5516
0xbd5369 execute
        /repo/gcc-trunk/gcc/ira.c:5700
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


$ armv7a-hardfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-armv7a-hardfloat/bin/armv7a-hardfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-270639-checking-yes-rtl-df-extra-armv7a-hardfloat/bin/../libexec/gcc/armv7a-hardfloat-linux-gnueabi/10.0.0/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
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-float=hard --with-fpu=vfpv4 --with-arch=armv7-a --with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=armv7a-hardfloat-linux-gnueabi --with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld --with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-270639-checking-yes-rtl-df-extra-armv7a-hardfloat
Thread model: posix
gcc version 10.0.0 20190429 (experimental) (GCC)
Comment 1 Jakub Jelinek 2019-05-03 09:16:34 UTC
GCC 9.1 has been released.
Comment 2 Jakub Jelinek 2019-08-12 08:55:32 UTC
GCC 9.2 has been released.
Comment 3 Jeffrey A. Law 2020-02-28 04:40:29 UTC
So I tried a variety of revisions from April 29, 2019, but was unable to reproduce this problem.  I also tried a subset of those revisions under valgrind just in case there was an uninitialized read, memory corruption or the like.  Other than the well known issues with sparsesets, nothing triggered.

There are other ICEs from this gcc_unreachable that have been fixed, but from my research a variety of issues in allocation/reloading can be caught by this gcc_unreachable.

I'm going to close this as WORKSFORME.

Obviously if you can still reproduce, please reopen and we'll dig deeper.

As always, thanks for your reports.

Jeff