https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111369
Bug ID: 111369
Summary: ICE in handle_cast, gimple-lower-bitint.cc:1486 with
-Os
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: fkastl at suse dot cz
CC: jakub at redhat dot com, mjambor at suse dot cz
Target Milestone: ---
Host: x86_64-linux
Target: x86_64-linux
Compiling gcc/testsuite/gcc.dg/torture/bitint-42.c with -Os produces this
error:
../gcc/gcc/testsuite/gcc.dg/torture/bitint-42.c: In function ‘main’:
../gcc/gcc/testsuite/gcc.dg/torture/bitint-42.c:50:1: internal compiler error:
in handle_cast, at gimple-lower-bitint.cc:1486
50 | main ()
| ^~~~
0x8cfc31 handle_cast
../../gcc/gcc/gimple-lower-bitint.cc:1486
0x1daafe8 handle_operand
../../gcc/gcc/gimple-lower-bitint.cc:791
0x1db31f0 lower_mergeable_stmt
../../gcc/gcc/gimple-lower-bitint.cc:2386
0x1db4c5d lower_stmt
../../gcc/gcc/gimple-lower-bitint.cc:4687
0x1db68fd gimple_lower_bitint
../../gcc/gcc/gimple-lower-bitint.cc:5767
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.
An assert fails at the line 1486:
1478 else if (TREE_CODE (lhs_type) == BITINT_TYPE
1479 && bitint_precision_kind (lhs_type) >= bitint_prec_large
1480 && INTEGRAL_TYPE_P (rhs_type))
1481 {
1482 /* Add support for 3 or more limbs filled in from normal integral
1483 type if this assert fails. If no target chooses limb mode
smaller
1484 than half of largest supported normal integral type, this will
not
1485 be needed. */
1486 gcc_assert (TYPE_PRECISION (rhs_type) <= 2 * limb_prec);
1487 tree r1 = NULL_TREE, r2 = NULL_TREE, rext = NULL_TREE;
1488 if (m_first)
1489 {