* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pta-structcopy-1.c
blobf9cf8920b6330e446bb6aaacb2c9d6b9f9f10f79
1 /* { dg-do run } */
2 /* { dg-options "-fdump-tree-ealias -Wno-attributes" } */
3 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
5 struct X
7 long l1;
8 struct Y
10 long l2;
11 int *p;
12 } y;
14 int i;
15 static int __attribute__((always_inline))
16 foo (struct X *x)
18 struct Y y = x->y;
19 /* In the inlined instance the dereferenced pointer needs to point to i. */
20 *y.p = 0;
21 i = 1;
22 return *y.p;
24 extern void abort (void);
25 int main()
27 struct X x;
28 x.y.p = &i;
29 if (foo(&x) != 1)
30 abort ();
31 return 0;
34 /* { dg-final { scan-tree-dump "y.* = { i }" "ealias" } } */
35 /* { dg-final { scan-tree-dump "y.*, points-to vars: { D..... }" "ealias" } } */