https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110804
Bug ID: 110804 Summary: [13 regression] eliminate_stmt ICE on aarch64 Product: gcc Version: 13.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: alice at ayaya dot dev Target Milestone: --- Created attachment 55629 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55629&action=edit minimised repro, crashes with -O2 using the latest of the gcc13 snapshots (presently 13-20230722, but this is present since 13 i think), i noticed that the swizzle_test.cc of the google highway library fails to compile on version 1.0.5. for reference, the test file is https://github.com/google/highway/blob/1.0.5/hwy/tests/swizzle_test.cc the compiler failure looks like [127/130] Linking CXX executable tests/arithmetic_test ninja: job failed: /usr/lib/ccache/bin/g++ -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DHWY_SHARED_DEFINE -DTOOLCHAIN_MISS_ASM_HWCAP_H -I/home/demon/src/aports/community/highway/src/highway-1.0.5 -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -flto=auto -O2 -DNDEBUG -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 -fmath-errno -fno-exceptions -DHWY_IS_TEST=1 -MD -MT CMakeFiles/swizzle_test.dir/hwy/tests/swizzle_test.cc.o -MF CMakeFiles/swizzle_test.dir/hwy/tests/swizzle_test.cc.o.d -o CMakeFiles/swizzle_test.dir/hwy/tests/swizzle_test.cc.o -c /home/demon/src/aports/community/highway/src/highway-1.0.5/hwy/tests/swizzle_test.cc during GIMPLE pass: fre /home/demon/src/aports/community/highway/src/highway-1.0.5/hwy/tests/swizzle_test.cc: In function 'hwy::N_SVE::TestPer4LaneBlockShuffle::TestTblLookupPer4LaneBlkShuf<hwy::N_SVE::Simd<long, 32ul, 0> >(hwy::N_SVE::Simd<long, 32ul, 0>, unsigned long, hwy::N_SVE::Simd<long, 32ul, 0>::T const*, hwy::N_SVE::Simd<long, 32ul, 0>::T*)void': /home/demon/src/aports/community/highway/src/highway-1.0.5/hwy/tests/swizzle_test.cc:393:1: internal compiler error: in const_unop, at fold-const.cc:1884 393 | } // namespace hwy | ^ then i went to minimise it using cvise. i forgot to correctly check that i got the same ICE error, so i ended up with one in eliminate_stmt. minimised repro attached. it only crashes with -O2 (not with -O1). i'm not sure if this is the same crash as the original const_unop, it might be a separate case.