PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / reassoc-43.c
blobea44f300f94e7e282f964283805aa444ea92769f
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-reassoc -w" } */
4 typedef union tree_node *tree;
5 enum cpp_ttype { CPP_COLON, CPP_SEMICOLON, CPP_CLOSE_BRACE, CPP_COMMA };
6 enum rid { RID_STATIC = 0, RID_ATTRIBUTE, };
7 typedef struct c_token
9 enum cpp_ttype type:8;
11 c_token;
12 typedef struct c_parser
14 c_token tokens[2];
15 short tokens_avail;
17 c_parser;
18 __inline__ c_token *
19 c_parser_peek_token (c_parser * parser)
21 if (parser->tokens_avail == 0)
23 parser->tokens_avail = 1;
25 return &parser->tokens[0];
28 __inline__ unsigned char
29 c_parser_next_token_is (c_parser * parser, enum cpp_ttype type)
31 return c_parser_peek_token (parser)->type == type;
34 void
35 c_parser_translation_unit (c_parser * parser)
37 tree prefix_attrs;
38 tree all_prefix_attrs;
39 while (1)
41 if (c_parser_next_token_is (parser, CPP_COLON)
42 || c_parser_next_token_is (parser, CPP_COMMA)
43 || c_parser_next_token_is (parser, CPP_SEMICOLON)
44 || c_parser_next_token_is (parser, CPP_CLOSE_BRACE)
45 || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE))
47 if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE))
48 all_prefix_attrs =
49 chainon (c_parser_attributes (parser), prefix_attrs);
53 /* { dg-final { scan-tree-dump-not "0 != 0" "reassoc2"} } */