re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030807-3.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom3" } */
3
4 typedef unsigned int cppchar_t;
5 cppchar_t
6 cpp_parse_escape (pstr, limit, wide)
7 const unsigned char **pstr;
8 const unsigned char *limit;
9 int wide;
10 {
11 cppchar_t i = 0;
12 int overflow = 0;
13 cppchar_t mask = ~0;
14
15 while (*pstr < limit)
16 {
17 overflow |= i ^ (i << 4 >> 4);
18 i = oof ();
19 }
20 if (overflow | (i != (i & mask)))
21 foo();
22 }
23
24 /* There should be precisely three IF statements. If there is
25 more than two, then the dominator optimizations failed. */
26 /* { dg-final { scan-tree-dump-times "if " 3 "dom3"} } */
27 /* { dg-final { cleanup-tree-dump "dom3" } } */