https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128675
Bug ID: 128675
Summary: ICE in convert_move at -O2 with -m32 passing a
conditional to a _BitInt(65) parameter
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: shimizu2486 at gmail dot com
Target Milestone: ---
Live Reproducer: https://godbolt.org/z/dEoEcqW8M
Compiling the following C code with gcc -m32 -O2 causes ICE:
$ cat t1.c
void f(_BitInt(65));
void g(_BitInt(65) x) {
f(x ? 1 : 2);
}
$ gcc -m32 -O2 -c t1.c
during RTL pass: expand
<source>: In function 'g':
<source>:3:3: internal compiler error: in convert_move, at expr.cc:228
3 | f(x ? 1 : 2);
| ^~~~~~~~~~~~
0x27f7278 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x27ebebb internal_error(char const*, ...)
???:0
0xa8945e fancy_abort(char const*, int, char const*)
???:0
0xdbfbce convert_modes(machine_mode, machine_mode, rtx_def*, int)
???:0
0xdb5401 expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode,
expand_modifier)
???:0
0xdbcc73 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xdbabfd expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xdbcd54 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
???:0
0xdb165f expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode,
expand_modifier)
???:0
0xdbcc73 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
/cefs/8b/8b76e75606cfd783576b5842_gcc-trunk-20261112/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultilib 32 -imultiarch i386-linux-gnu -iprefix
/cefs/8b/8b76e75606cfd783576b5842_gcc-trunk-20261112/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-m32 -mtune=generic -march=x86-64 -g -O2 -fdiagnostics-color=always
-fno-verbose-asm -o /app/output.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.
i686 trunk (842e09f03b64) ICE
i686 16.2.0 ICE
i686 15.3.0 ICE
i686 14.4.0 ICE
-O2 and -O3 ICE; -O0, -O1 and -Os compile. arm-linux-gnueabihf ICEs the same
way; x86-64 without -m32 compiles it.