OSDN Git Service

2012-01-30 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / restrict-4.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 int
5 foo (int *x, int y)
6 {
7   int *__restrict p1 = x;
8   int *__restrict p2 = x + 32;
9   p1[y] = 1;
10   p2[4] = 2;
11   return p1[y];
12 }
13
14 int
15 bar (int *x, int y)
16 {
17   int *__restrict p1 = x;
18   int *p3 = x + 32;
19   int *__restrict p2 = p3;
20   p1[y] = 1;
21   p2[4] = 2;
22   return p1[y];
23 }
24
25 /* { dg-final { scan-tree-dump-times "return 1;" 2 "optimized" { xfail *-*-* } } } */
26 /* { dg-final { cleanup-tree-dump "optimized" } } */