1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
3 /* On Alpha EV4, dead code elimination and cfg simplification conspired
4 to leave the register containing 'C' marked live, though all references
5 to the variable had been removed. */
9 struct operand_data *next;
11 const char *predicate;
12 const char *constraint;
14 unsigned char n_alternatives;
34 struct operand_data operand[40];
37 extern void message_with_line (int, const char *, ...)
38 __attribute__ ((__format__ (__printf__, 2, 3)));
39 extern int have_error;
41 extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__));
44 validate_insn_alternatives (d)
49 for (start = 0; start < d->n_operands; start++)
50 if (d->operand[start].n_alternatives > 0)
54 char c; /* { dg-bogus "used uninitialized" "uninitialized variable warning" } */
55 int which_alternative = 0;
56 int alternative_count_unsure = 0;
58 for (p = d->operand[start].constraint; (c = *p); p += len)
62 if (len < 1 || (len > 1 && strchr (",#*+=&%!0123456789", c)))
64 message_with_line (d->lineno,
65 "invalid length %d for char '%c' in alternative %d of operand %d",
66 len, c, which_alternative, start);
77 for (i = 1; i < len; i++)
80 message_with_line (d->lineno,
81 "NUL in alternative %d of operand %d",
82 which_alternative, start);
83 alternative_count_unsure = 1;
86 else if (strchr (",#*", p[i]))
88 message_with_line (d->lineno,
89 "'%c' in alternative %d of operand %d",
90 p[i], which_alternative, start);
91 alternative_count_unsure = 1;
94 if (alternative_count_unsure)
97 n = d->operand[start].n_alternatives;
98 else if (n != d->operand[start].n_alternatives)
100 message_with_line (d->lineno,
101 "wrong number of alternatives in operand %d",
108 d->n_alternatives = n;