Adjust scan string for PIE
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-pta-4.c
blobbf6fa281d5a865efefb9cb0a4f24554274d97925
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2-details" } */
4 int a, b;
6 static int __attribute__((noinline,noclone))
7 foo (int *p, int *q)
9 int res;
10 *p = 1;
11 *q = 0;
12 res = *p;
13 a = 1;
14 b = 1;
15 return res;
18 extern void abort (void);
20 int main()
22 if (foo (&a, &b) != 1)
23 abort ();
24 return 0;
27 /* Verify we can disambiguate *p and *q in foo. */
29 /* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
30 /* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
31 /* { dg-final { scan-tree-dump "Replaced \\\*p_2\\\(D\\\) with 1" "fre2" } } */
32 /* { dg-final { cleanup-tree-dump "fre2" } } */
33 /* { dg-final { cleanup-ipa-dump "pta" } } */