| 1 |
/* Test that we don't let stmt.c think that the enumeration's values are |
| 2 |
the entire set of possibilities. Such an assumption is false for C, |
| 3 |
but true for other languages. */ |
| 4 |
|
| 5 |
void abort (void); |
| 6 |
|
| 7 |
enum X { X1 = 1, X2, X3, X4 }; |
| 8 |
static volatile enum X test = 0; |
| 9 |
static void y(int); |
| 10 |
|
| 11 |
int main() |
| 12 |
{ |
| 13 |
switch (test) |
| 14 |
{ |
| 15 |
case X1: y(1); break; |
| 16 |
case X2: y(2); break; |
| 17 |
case X3: y(3); break; |
| 18 |
case X4: y(4); break; |
| 19 |
} |
| 20 |
return 0; |
| 21 |
} |
| 22 |
|
| 23 |
static void y(int x) { abort (); } |