https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113003
Bug ID: 113003
Summary: ICE: in expand_mult, at expmed.cc:3603 at -O with
__builtin_mul_overflow_p() and _BitInt()
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
CC: jakub at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 56873
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56873&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:6:7: internal compiler error: in expand_mult, at expmed.cc:3603
6 | b = __builtin_mul_overflow_p(a, (_BitInt(383))3545869000730815518 <<
64 << 4, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~
0x7573f8 expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
/repo/gcc-trunk/gcc/expmed.cc:3603
0x11e7a3c expand_arith_overflow
/repo/gcc-trunk/gcc/internal-fn.cc:2722
0xf74a6f expand_call_stmt
/repo/gcc-trunk/gcc/cfgexpand.cc:2744
0xf74a6f expand_gimple_stmt_1
/repo/gcc-trunk/gcc/cfgexpand.cc:3900
0xf74a6f expand_gimple_stmt
/repo/gcc-trunk/gcc/cfgexpand.cc:4064
0xf7b04e expand_gimple_basic_block
/repo/gcc-trunk/gcc/cfgexpand.cc:6120
0xf7cd27 execute
/repo/gcc-trunk/gcc/cfgexpand.cc:6855
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.
This is with g373a85a82650d9938adb02a14686049cbcbe6892 ;
g348874f0baac0f22c98ab11abbfa65fd172f6bdd breaks the build for me (as can be
also seen on gcc-regression)