Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_empty_str.c
blob58411202767a8c718641828716e62adac55072b2
1 /* { dg-options "-O3 -fno-inline -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
2 /* { dg-do compile } */
3 /* { dg-do run } */
5 #include <stdlib.h>
7 struct S { int a; struct V *b; };
8 typedef struct { int c; } T;
9 typedef struct { int d; int e; } U;
11 void *
12 fn (void *x)
14 return x;
17 int
18 foo (struct S *s)
20 T x;
22 T y = *(T *)fn (&x);
23 return y.c;
26 int
27 bar (struct S *s)
29 U x;
31 U y = *(U *)fn (&x);
32 return y.d + s->a;
35 int
36 main ()
38 struct S s;
40 foo(&s) + bar (&s);
42 return 0;
45 /*--------------------------------------------------------------------------*/
46 /* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" { xfail *-*-* } } } */
47 /* { dg-final { cleanup-ipa-dump "*" } } */