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

            Bug ID: 128105
           Summary: [17 Regression] ICE: in expand_shift_1, at
                    expmed.cc:2882 with -mvpclmulqdq -mno-sse and
                    __builtin_crc16_data16()
           Product: gcc
           Version: 17.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 65935
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65935&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -mvpclmulqdq -mno-sse testcase.c 
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:4:10: internal compiler error: in expand_shift_1, at expmed.cc:2882
    4 |   return __builtin_crc16_data16(0, s, 0);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x2f7082f internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xd486b1 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x801fc9 expand_shift_1
        /repo/gcc-trunk/gcc/expmed.cc:2882
0x1073a53 expand_shift(tree_code, machine_mode, rtx_def*, poly_int<1u, long>,
rtx_def*, int)
        /repo/gcc-trunk/gcc/expmed.cc:2897
0x1beb934 ix86_expand_crc_using_pclmul(scalar_mode, scalar_mode, rtx_def**)
        /repo/gcc-trunk/gcc/config/i386/i386-expand.cc:30874
0x27351ad gen_crchihi4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/i386.md:30726
0x1400fe8 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8694
0x1400fe8 expand_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8725
0x1233adf expand_crc_optab_fn
        /repo/gcc-trunk/gcc/internal-fn.cc:4205
0xf3d72f expand_call_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:3162
0xf3d72f expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.cc:4283
0xf3d72f expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:4430
0xf3fb87 expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6547
0xf42077 execute
        /repo/gcc-trunk/gcc/cfgexpand.cc:7298
/repo/gcc-trunk/binary-trunk-20261023033728-g0ab0aff0131-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20261023033728-g0ab0aff0131-checking-yes-rtl-df-extra-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mvpclmulqdq -mno-sse -mtune=generic -march=x86-64 -o /tmp/ccGr3Nq9.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.

$ 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-20261023033728-g0ab0aff0131-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.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
--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-20261023033728-g0ab0aff0131-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20261023 (experimental) (GCC)

Reply via email to