OSDN Git Service

Fix PR 17408 and PR 17409.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / enum-1.c
1 typedef enum
2 {
3   END = -1,
4   EMPTY = (1 << 8 ) ,
5   BACKREF,
6   BEGLINE,
7   ENDLINE,
8   BEGWORD,
9   ENDWORD,
10   LIMWORD,
11   NOTLIMWORD,
12   QMARK,
13   STAR,
14   PLUS,
15   REPMN,
16   CAT,
17   OR,
18   ORTOP,
19   LPAREN,
20   RPAREN,
21   CSET
22 } token;
23
24 static token tok;
25
26 static int
27 atom ()
28 {
29   if ((tok >= 0 && tok < (1 << 8 ) ) || tok >= CSET || tok == BACKREF
30       || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD
31       || tok == ENDWORD || tok == LIMWORD || tok == NOTLIMWORD)
32     return 1;
33   else
34     return 0;
35 }
36
37 main ()
38 {
39   tok = 0;
40   if (atom () != 1)
41     abort ();
42   exit (0);
43 }