More fold_negate in match.pd
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040430-1.c
blob4fbd950f3dd9d7d2dbabe5aa0db08e1d070c7056
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"} } */