Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dce-7.c
blobdac837325e2d8b456529e4539b2959aabe362340
1 /* { dg-do link } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
4 extern void link_error (void);
5 void foo(int n)
7 int * f = (int*) __builtin_malloc (n * sizeof (int));
8 int * ff = (int*) __builtin_malloc (n * sizeof (int));
9 int i;
11 for (i = 0; i < n; ++i)
13 f[i] = 1;
14 ff[i] = 2;
15 if (f[i] != 1)
16 link_error ();
17 if (ff[i] != 2)
18 link_error ();
21 __builtin_free (f);
22 __builtin_free (ff);
24 int main()
26 return 0;
29 /* We should have removed the calls to link_error () and all stores
30 to the allocated memory. */
32 /* { dg-final { scan-tree-dump-times "\\\*D" 0 "optimized" } } */