Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040430-1.c
blob4bc1f85ae94d563a2830ae85919521472db98df8
1 /* PR middle-end/14470. Similar to
2 gcc.c-torture/execute/20040313-1.c, but with a compile time test to
3 make sure the second if() is removed. */
4 /* Update: We now remove both ifs. Whee. */
6 /* { dg-do run } */
7 /* { dg-options "-O2 -fdump-tree-optimized" } */
10 extern void abort(void);
12 int main()
14 int t[1025] = { 1024 }, d;
16 d = 0;
17 d = t[d]++;
18 if (t[0] != 1025)
19 abort();
20 if (d != 1024)
21 abort();
22 return 0;
25 /* { dg-final { scan-tree-dump-times "if " 0 "optimized"} } */
26 /* { dg-final { cleanup-tree-dump "optimized" } } */