struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-enum-1.c
blob20d74914a028b4cda99474f3fbaaba07419349ca
1 /*
2 enum-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 typedef enum
9 END = -1,
10 EMPTY = (1 << 8 ) ,
11 BACKREF,
12 BEGLINE,
13 ENDLINE,
14 BEGWORD,
15 ENDWORD,
16 LIMWORD,
17 NOTLIMWORD,
18 QMARK,
19 STAR,
20 PLUS,
21 REPMN,
22 CAT,
23 OR,
24 ORTOP,
25 LPAREN,
26 RPAREN,
27 CSET
28 } token;
30 static token tok;
32 static int
33 atom ()
35 if ((tok >= 0 && tok < (1 << 8 ) ) || tok >= CSET || tok == BACKREF
36 || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD
37 || tok == ENDWORD || tok == LIMWORD || tok == NOTLIMWORD)
38 return 1;
39 else
40 return 0;
43 void
44 testTortureExecute (void)
46 tok = 0;
47 if (atom () != 1)
48 ASSERT (0);
49 return;