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

            Bug ID: 105624
           Summary: [13 Regression] ICE in final_scan_insn_1, at
                    final.cc:2861 (error: could not split insn)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc 13.0.0 20220515 snapshot (g:18547874ee205d830acb31f1e3c1c89fc7725c14) ICEs
when compiling the following testcase w/ -march=k8 -O1:

union U {
  double d;
  unsigned long long int i;
};

double
fabs (double x)
{
  union U u;

  u.d = x;
  u.i &= ~0ULL >> 1;

  return u.d;
}

% x86_64-pc-linux-gnu-gcc-13.0.0 -march=k8 -O1 -c ifnwa4ea.c
ifnwa4ea.c: In function 'fabs':
ifnwa4ea.c:15:1: error: could not split insn
   15 | }
      | ^
(insn 8 17 18 2 (parallel [
            (set (reg:DI 0 ax [91])
                (and:DI (reg:DI 0 ax [91])
                    (reg:DI 20 xmm0 [89])))
            (clobber (reg:CC 17 flags))
        ]) "ifnwa4ea.c":14:11 530 {*anddi_1_btr}
     (expr_list:REG_DEAD (reg:DI 20 xmm0 [89])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
during RTL pass: final
ifnwa4ea.c:15:1: internal compiler error: in final_scan_insn_1, at
final.cc:2861
0x73a629 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/rtl-error.cc:108
0x6c15f7 final_scan_insn_1
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/final.cc:2861
0xb6e51b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/final.cc:2940
0xb6e775 final_1
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/final.cc:1997
0xb6f351 rest_of_handle_final
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/final.cc:4285
0xb6f351 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220515/work/gcc-13-20220515/gcc/final.cc:4363

Reply via email to