Bug 2385937 - ICE in extract_insn, at recog.cc:2882
Summary: ICE in extract_insn, at recog.cc:2882
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 42
Hardware: aarch64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2025-08-01 13:38 UTC by Dan Horák
Modified: 2025-08-01 17:48 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
preprocessed source (924.90 KB, application/gzip)
2025-08-01 13:39 UTC, Dan Horák
no flags Details
preprocessed source (917.91 KB, application/gzip)
2025-08-01 14:28 UTC, Dan Horák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 121358 0 P3 UNCONFIRMED [15/16 Regression] SVE ICE compiling highway since r15-4235 2025-08-01 17:48:54 UTC

Description Dan Horák 2025-08-01 13:38:51 UTC
When compiling https://github.com/google/highway I am getting an ICE

...
make[2]: Entering directory '/home/sharkcz/projects/highway/build'
[ 93%] Building CXX object CMakeFiles/random_test.dir/hwy/contrib/random/random_test.cc.o
/usr/bin/c++ -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DHWY_STATIC_DEFINE -I/home/sharkcz/projects/highway -O2 -g -DNDEBUG -std=c++17 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fmerge-all-constants -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -Wcast-align -fmath-errno -fno-exceptions -Wno-psabi -DHWY_IS_TEST=1 -MD -MT CMakeFiles/random_test.dir/hwy/contrib/random/random_test.cc.o -MF CMakeFiles/random_test.dir/hwy/contrib/random/random_test.cc.o.d -o CMakeFiles/random_test.dir/hwy/contrib/random/random_test.cc.o -c /home/sharkcz/projects/highway/hwy/contrib/random/random_test.cc
In file included from /home/sharkcz/projects/highway/hwy/contrib/random/random_test.cc:19,
                 from /home/sharkcz/projects/highway/hwy/foreach_target.h:196,
                 from /home/sharkcz/projects/highway/hwy/contrib/random/random_test.cc:17:
/home/sharkcz/projects/highway/hwy/contrib/random/random-inl.h: In constructor ‘hwy::N_SVE::VectorXoshiro::VectorXoshiro(uint64_t, uint64_t)’:
/home/sharkcz/projects/highway/hwy/contrib/random/random-inl.h:199:3: error: unrecognizable insn:
  199 |   }
      |   ^
(insn 37 36 38 2 (set (reg:TI 163 [ D.336200 ])
        (subreg:TI (const_vector:V2DI [
                    (const_int 4 [0x4])
                    (const_poly_int:DI [2, 2])
                ]) 0)) "/home/sharkcz/projects/highway/hwy/contrib/random/random-inl.h":183:9 -1
     (nil))
during RTL pass: vregs
/home/sharkcz/projects/highway/hwy/contrib/random/random-inl.h:199:3: internal compiler error: in extract_insn, at recog.cc:2882
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccYXMOjE.out file, please attach this to your bugreport.
make[2]: *** [CMakeFiles/random_test.dir/build.make:79: CMakeFiles/random_test.dir/hwy/contrib/random/random_test.cc.o] Error 1

This is on Fedora 42 with gcc-15.1.1-2.fc42.aarch64

Reproducible: Always

Comment 1 Dan Horák 2025-08-01 13:39:35 UTC
Created attachment 2102310 [details]
preprocessed source

Comment 2 Dan Horák 2025-08-01 14:28:16 UTC
Created attachment 2102376 [details]
preprocessed source

pruned the source code in random_test.cc

Comment 3 Jakub Jelinek 2025-08-01 14:32:45 UTC
I'm already cvise reducing it, at 7542484 bytes preprocessed now after 26 minutes.

Comment 4 Dan Horák 2025-08-01 14:40:15 UTC
thanks, I usually struggle with cvise :-)

Comment 5 Jakub Jelinek 2025-08-01 17:18:15 UTC
Reduced testcase (-O2):
#pragma GCC aarch64 "arm_sve.h"
#pragma GCC target "+sve2"

struct A { int b[2]; };
struct B { B (A); };
struct C { C () : g { { 0, (int) svcntd_pat (SV_ALL) } } {} B g; };

void
foo ()
{
  C {};
}


Note You need to log in before you can comment on or make changes to this bug.