PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-pta-16.c
blobef41826322d24f3dd54738049f0de9a99af6b699
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fno-tree-sra -fipa-pta -fdump-ipa-pta" } */
4 struct X
6 long l1;
7 struct Y
9 long l2;
10 int *p;
11 } y;
13 int i;
14 static int __attribute__((noinline))
15 foo (struct X *x)
17 struct Y y = x->y;
18 *y.p = 0;
19 i = 1;
20 return *y.p;
22 extern void abort (void);
23 int main()
25 struct X x;
26 x.y.p = &i;
27 if (foo(&x) != 1)
28 abort ();
29 return 0;
32 /* { dg-final { scan-ipa-dump "y.\[0-9\]*\\\+\[0-9\]* = { i }" "pta" } } */
33 /* { dg-final { cleanup-ipa-dump "pta" } } */