https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128578
Bug ID: 128578
Summary: ICE: SIGSEGV in expand_expr_real (expr.cc:9656) with
__builtin_clmulg() on unsigned char
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
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 66117
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66117&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.c
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:2:14: internal compiler error: Segmentation fault
2 | void foo() { __builtin_clmulg(a, a); }
| ^~~~~~~~~~~~~~~~~~~~~~
0x2fb06f9 internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0x15db78f crash_signal
/repo/gcc-trunk/gcc/toplev.cc:325
0x10adfe0 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/repo/gcc-trunk/gcc/expr.cc:9656
0x12528b3 expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
/repo/gcc-trunk/gcc/expr.h:323
0x12528b3 expand_CLMUL(internal_fn, gcall*)
/repo/gcc-trunk/gcc/internal-fn.cc:6209
0xf50e7f expand_call_stmt
/repo/gcc-trunk/gcc/cfgexpand.cc:3146
0xf50e7f expand_gimple_stmt_1
/repo/gcc-trunk/gcc/cfgexpand.cc:4282
0xf50e7f expand_gimple_stmt
/repo/gcc-trunk/gcc/cfgexpand.cc:4429
0xf529e7 expand_gimple_basic_block
/repo/gcc-trunk/gcc/cfgexpand.cc:6546
0xf54dd7 execute
/repo/gcc-trunk/gcc/cfgexpand.cc:7297
/repo/gcc-trunk/binary-trunk-20261109011635-ga74179d0852-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20261109011635-ga74179d0852-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -o /tmp/ccgPMb9h.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-20261109120833-g9adb420e482-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-20261109120833-g9adb420e482-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20261109 (experimental) (GCC)