[Bug inline-asm/84742] internal compiler error: in process_alt_operands, at lra-constraints.c:2112

vegard.nossum at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 8 12:22:00 GMT 2018


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

--- Comment #4 from Vegard Nossum <vegard.nossum at gmail dot com> ---
So I think the problem is that this loop in lra_set_insn_recog_data() counts
the number of commas and uses that as the number of alternatives:

1018               for (p =  constraints[0]; *p; p++)
1019                 nalt += *p == ',';

And then later we can skip over the comma inside preprocess_constraints()
because 'T' is not recognised in the switch and then it does:

p += CONSTRAINT_LEN (c, p);

where CONSTRAINT_LEN for 'T' is 2:

static inline size_t
insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)
{
  switch (fc)
    {
    case 'B': return 2;
    case 'T': return 2;
    case 'W': return 2;
    case 'Y': return 2;
    default: break;
    }
  return 1;
}

(so the real problematic bit of the constraint is this: "T,")


More information about the Gcc-bugs mailing list