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

            Bug ID: 112332
           Summary: [14 regression] ICE: internal compiler error: in
                    extract_constrain_insn, at recog.cc:2705
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed ICE today when attempted to build python-3.11.6 with gcc-master
r14-5055-g7480dbb6e7891f.

Extracted reproducer:

// $ cat dtoa.c.c
typedef union {
  double d;
  int L[2];
} U;
void d2b();
char _Py_dg_dtoa(double dd) {
  int be;
  U u;
  u.d = dd;
  if ((&u)->L[1])
    d2b(&be);
  goto failed_malloc;
  goto fast_failed;
  goto one_digit;
  goto no_digits;
  goto ret1;
  goto bump_up;
fast_failed:
bump_up:
no_digits:
one_digit:
ret1:
failed_malloc:
  return 0;
}

Crashing:

./gcc/xgcc -Bgcc -O2 -fstack-protector-strong dtoa.c.c -o a.o
dtoa.c.c: In function ‘_Py_dg_dtoa’:
dtoa.c.c:25:1: error: insn does not satisfy its constraints:
   25 | }
      | ^
(insn 51 3 9 2 (parallel [
            (set (mem/v/f/c:DI (plus:DI (reg/f:DI 7 sp)
                        (const_int 8 [0x8])) [4 D.2786+0 S8 A64])
                (unspec:DI [
                        (mem/v/f:DI (const_int 40 [0x28]) [5
MEM[(<address-space-1> long unsigned int *)40B]+0 S8 A64 AS1])
                    ] UNSPEC_SP_SET))
            (set (reg:DI 0 ax [orig:103 dd ] [103])
                (reg:DI 20 xmm0 [109]))
        ]) "dtoa.c.c":10:6 1461 {*stack_protect_set_2_di_di}
     (expr_list:REG_DEAD (reg:DI 20 xmm0 [109])
        (nil)))
during RTL pass: cprop_hardreg
dtoa.c.c:25:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2705
0x7ef71b _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/slyfox/dev/git/gcc/gcc/rtl-error.cc:108
0x7ef741 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/slyfox/dev/git/gcc/gcc/rtl-error.cc:118
0x7eddcb extract_constrain_insn(rtx_insn*)
        /home/slyfox/dev/git/gcc/gcc/recog.cc:2705
0xf60c47 copyprop_hardreg_forward_1
        /home/slyfox/dev/git/gcc/gcc/regcprop.cc:836
0xf61d44 execute
        /home/slyfox/dev/git/gcc/gcc/regcprop.cc:1423

Compiler:

$ ./gcc/xgcc -Bgcc -v
Reading specs from gcc/specs
COLLECT_GCC=./gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-bootstrap
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231101 (experimental) (GCC)

Reply via email to