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

            Bug ID: 67356
           Summary: PowerPC insn does not satisfy its constraints
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anton at samba dot org
  Target Milestone: ---

The following testcase:

# cat testcase.i

int a, b, d, e;
static int *c = &a;
void fn1()
{
        long f = 18446744073709551608UL;
        b = 0;
        for (; b <= 0; b++) {
                long *g = &f;
                e || (*c = (*g)++ | d);
        }
}

Hits an ICE when built with -Os:

gcc -Os testcase.i
testcase.i: In function 'fn1':
testcase.i:11:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 94 93 30 3 (set (reg:SI 9 9 [173])
        (ior:SI (and:SI (rotate:SI (reg:SI 8 8)
                    (const_int 3 [0x3]))
                (const_int -8 [0xfffffffffffffff8]))
            (and:SI (reg:SI 10 10 [orig:163 d ] [163])
                (const_int 7 [0x7])))) testcase.i:9 235 {*rotlsi3_insert}
     (expr_list:REG_DEAD (reg:SI 10 10 [orig:163 d ] [163])
        (expr_list:REG_DEAD (reg:SI 8 8)
            (nil))))
testcase.i:11:1: internal compiler error: in extract_constrain_insn, at
recog.c:2200
0x10795563 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/gcc/rtl-error.c:109
0x107955c7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/gcc/rtl-error.c:120
0x1075a397 extract_constrain_insn(rtx_insn*)
        ../../gcc/gcc/recog.c:2200
0x1075f58b copyprop_hardreg_forward_1
        ../../gcc/gcc/regcprop.c:778
0x107606ab execute
        ../../gcc/gcc/regcprop.c:1268

Reply via email to