https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126202
--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
I see a similar ICE on `master` when building `libvpx-1.16.0`. Here is my
reproducer if it's of any help:
// $ cat a.c.c
typedef long __m128i __attribute__((__vector_size__(16)));
__m128i _mm_store_si128___B;
typedef long __m256i __attribute__((__vector_size__(32)));
int vpx_quantize_b_avx___trans_tmp_6, vpx_quantize_b_avx_index;
void _mm256_store_si256(__m256i *__P, __m256i __A) { *__P = __A; }
void store_tran_low(int *b) { *(__m128i *)b = _mm_store_si128___B; }
void vpx_quantize_b_avx(int, long, int, int *qcoeff_ptr, int, short,
short *eob_ptr) {
__m256i __trans_tmp_5 = {};
if (vpx_quantize_b_avx___trans_tmp_6)
_mm256_store_si256((__m256i *)(qcoeff_ptr + vpx_quantize_b_avx_index + 8),
__trans_tmp_5);
store_tran_low(qcoeff_ptr + vpx_quantize_b_avx_index + 8);
*eob_ptr = 0;
}
$ gcc/xgcc -Bgcc -c a.c.c -o bug.o -mavx -O2 -fno-strict-overflow
during RTL pass: pro_and_epilogue
a.c.c: In function ‘vpx_quantize_b_avx’:
a.c.c:15:1: internal compiler error: in ix86_finalize_stack_frame_flags, at
config/i386/i386.cc:8829
15 | }
| ^
0x2862980 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2854b72 internal_error(char const*, ...)
???:0
0x285feb7 fancy_abort(char const*, int, char const*)
???:0
0x15aa2c2 ix86_finalize_stack_frame_flags()
???:0
0x15ac5cb ix86_expand_epilogue(int)
???:0
0x20ca0fd gen_epilogue()
???:0
0x15959b0 target_gen_epilogue()
???:0
0xc1f758 make_epilogue_seq()
???:0
0xc1f81c thread_prologue_and_epilogue_insns()
???:0
0xc200cf rest_of_handle_thread_prologue_and_epilogue(function*)
???:0
0xc20121 (anonymous
namespace)::pass_thread_prologue_and_epilogue::execute(function*)
???:0
gcc/cc1 -quiet -iprefix /tmp/gb/gcc/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
-isystem gcc/include -isystem gcc/include-fixed a.c.c -quiet -dumpbase bug.c
-dumpbase-ext .c -mavx -mtune=generic -march=x86-64 -O2 -fno-strict-overflow -o
/tmp/nix-shell-1188466-1956017044/ccL4gVVq.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ gcc/xgcc -Bgcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c
CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260710 (experimental) (GCC)