[Bug bootstrap/102302] [12 Regression] ICE during RTL pass: expand: in gen_lowpart_general, at rtlhooks.c:57

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 13 09:44:03 GMT 2021


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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Reduced testcase:
-----------
typedef float HFtype __attribute__ ((mode (HF)));
union _FP_UNION_H {
  HFtype flt;
  struct  { unsigned frac }
};
typedef float SFtype __attribute__ ((mode (SF)));

__truncsfhf2 (SFtype a)
{
 HFtype r;
 union _FP_UNION_H _FP_PACK_RAW_1_flo;
 ((r)) = _FP_PACK_RAW_1_flo.flt;
 return r;
}
-----------

$ gdb --args  .../x86_64-pc-linux-gnu/12.0.0/cc1 -fpreprocessed truncsfhf10.i
-O1

Breakpoint 1, gen_lowpart_general (mode=E_SImode, x=0x7ffff7103ae0) at
../../repos/gcc/gcc/rtlhooks.c:57
57            result = gen_lowpart_common (mode, copy_to_reg (x));
58            gcc_assert (result != 0);

(gdb) p mode
$3 = E_SImode
(gdb) p debug_rtx(x)
(reg:HF 86)


More information about the Gcc-bugs mailing list