blob: e73db1c95ac37c6c93c4c23bf3e533fc0f46d68e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* { dg-do run } */
/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre-details" } */
static int __attribute__((noinline,noclone))
foo (int *p, int *q)
{
*p = 1;
*q = 0;
return *p;
}
extern void abort (void);
int main()
{
int a, b;
if (foo (&a, &b) != 1)
abort ();
return 0;
}
/* Verify we can disambiguate *p and *q in foo. */
/* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
/* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
|