PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / restrict-4.c
blobaa0a8d49e7a0de0fbddb59377d6374b011042732
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-icf" } */
4 int
5 foo (int *x, int y)
7 int *__restrict p1 = x;
8 int *__restrict p2 = x + 32;
9 p1[y] = 1;
10 p2[4] = 2;
11 return p1[y];
14 int
15 bar (int *x, int y)
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];
25 /* { dg-final { scan-tree-dump-times "return 1;" 2 "optimized" { xfail *-*-* } } } */