[Bug target/106933] [13 Regression] ICE in extract_insn, at recog.cc:2791 (error: unrecognizable insn) since r13-2049-g6f94923dea21bd92

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 6 16:03:47 GMT 2022


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

--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
JFTR, I've just got an ICE that I presume to be another manifestation of the
same issue. The current gcc trunk snapshots ICE the way reported in comment 0
on the following testcase w/ -msse4 -Os:

__int128 n;

__int128
empty (void)
{
}

int
foo (void)
{
  n = empty ();

  return n == 0;
}

while replacing the last return statement w/ "return n == 1;" gives the
following:

% x86_64-unknown-linux-gnu-gcc-13.0.0 -msse4 -Os -c lr4kukze.c
during RTL pass: cse2
lr4kukze.c: In function 'foo':
lr4kukze.c:14:1: internal compiler error: in as_a, at machmode.h:365
   14 | }
      | ^
0x73665b scalar_int_mode as_a<scalar_int_mode>(machine_mode)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/machmode.h:365
0x736783 scalar_mode as_a<scalar_mode>(machine_mode)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/rtl.h:2288
0x736783 wi::int_traits<std::pair<rtx_def*, machine_mode>
>::get_precision(std::pair<rtx_def*, machine_mode> const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/rtl.h:2273
0x736783 unsigned int wi::get_precision<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/wide-int.h:1794
0x736783 wide_int_ref_storage<false,
false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/wide-int.h:1024
0x736783 generic_wide_int<wide_int_ref_storage<false, false>
>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/wide-int.h:782
0x736783 poly_int<1u, generic_wide_int<wide_int_ref_storage<false, false> >
>::poly_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/poly-int.h:670
0x736783 wi::to_poly_wide(rtx_def const*, machine_mode)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/rtl.h:2373
0x736783 neg_poly_int_rtx
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/simplify-rtx.cc:57
0xec311e simplify_context::simplify_binary_operation_1(rtx_code, machine_mode,
rtx_def*, rtx_def*, rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/simplify-rtx.cc:3118
0xec501d simplify_context::simplify_binary_operation(rtx_code, machine_mode,
rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/simplify-rtx.cc:2626
0xed00c2 simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/rtl.h:3475
0xed00c2 simplify_const_relational_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/simplify-rtx.cc:6112
0xec948b simplify_context::simplify_relational_operation(rtx_code,
machine_mode, machine_mode, rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/simplify-rtx.cc:5704
0x1cfed28 simplify_relational_operation(rtx_code, machine_mode, machine_mode,
rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/rtl.h:3490
0x1cfed28 fold_rtx
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cse.cc:3385
0x1cfffb3 cse_insn
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cse.cc:4669
0x1d04e24 cse_extended_basic_block
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cse.cc:6566
0x1d04e24 cse_main
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cse.cc:6711
0x1d05750 rest_of_handle_cse2
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cse.cc:7600


More information about the Gcc-bugs mailing list