https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121096

            Bug ID: 121096
           Summary: [16 Regression] ICE: in store_by_pieces, at
                    expr.cc:1847 with -Os -mtune=k8 -mvpclmulqdq
                    -mstringop-strategy=vector_loop
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 61870
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61870&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os -mtune=k8 -mvpclmulqdq
-mstringop-strategy=vector_loop testcase.c -Wno-psabi
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:3:14: internal compiler error: in store_by_pieces, at expr.cc:1847
    3 | void foo() { bar((V){}); }
      |              ^~~~~~~~~~
0x2b987c1 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0xe053d9 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1818
0x7c7e4e store_by_pieces(rtx_def*, unsigned long, rtx_def* (*)(void*, void*,
long, fixed_size_mode), void*, unsigned int, bool, memop_ret)
        /repo/gcc-trunk/gcc/expr.cc:1847
0x1b3f9f0 expand_setmem_epilogue
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:8493
0x1b3f9f0 ix86_expand_set_or_cpymem(rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, bool)
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:9940
0x2358581 gen_setmemsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/i386.md:26059
0x143a695 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*>(rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:472
0x143a695 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8237
0x143f0f8 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8257
0x110e6c6 set_storage_via_setmem(rtx_def*, rtx_def*, rtx_def*, unsigned int,
unsigned int, long, unsigned long, unsigned long, unsigned long)
        /repo/gcc-trunk/gcc/expr.cc:4043
0x112410d clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned
int, long, unsigned long, unsigned long, unsigned long, unsigned int)
        /repo/gcc-trunk/gcc/expr.cc:3908
0x112f4ab clear_storage(rtx_def*, rtx_def*, block_op_methods)
        /repo/gcc-trunk/gcc/expr.cc:3933
0x112f4ab store_constructor(tree_node*, rtx_def*, int, poly_int<1u, long>,
bool)
        /repo/gcc-trunk/gcc/expr.cc:8034
0x1132575 expand_constructor
        /repo/gcc-trunk/gcc/expr.cc:9444
0x111d078 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:11807
0x111e84c expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:9523
0x111e84c expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
        /repo/gcc-trunk/gcc/expr.h:323
0x111e84c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:11682
0xfbb63c expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
        /repo/gcc-trunk/gcc/expr.h:323
0xfbb63c store_one_arg
        /repo/gcc-trunk/gcc/calls.cc:5082
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250715173344-r16-2264-g9956dc37cb3d71-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20250715173344-r16-2264-g9956dc37cb3d71-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20250715 (experimental) (GCC)

Reply via email to