OSDN Git Service

f8e19216ec351f4f6b9486b8dd1e5bea8bfb43a4
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-8.c
1 /* { dg-do compile } */ 
2 /* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-pre-stats" } */
3 struct s {
4       int *n;
5 };
6
7 int
8 foo (unsigned int i, struct s *array)
9 {
10   int *p = array[i].n;
11   if (p)
12     {
13       int *q = array[i].n;
14       if (p != q)
15         return 1;
16     }
17   return 0;
18 }
19 /* We should eliminate two address calculations, one cast, and one load.  */
20 /* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "pre"} } */
21 /* { dg-final { cleanup-tree-dump "pre" } } */