Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-6.c
blobc9a766d9e8f28ef4f30d9d20ee5ffb15e1702b4c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-slim" } */
4 struct bovid
6 float a;
7 int b;
8 struct bovid *next;
9 };
11 static int
12 __attribute__((noinline))
13 foo (struct bovid *cow, int i)
15 i++;
16 if (cow->next)
17 foo (cow->next, i);
18 return i;
21 int main (int argc, char *argv[])
23 struct bovid cow;
25 cow.a = 7.4;
26 cow.b = 6;
27 cow.next = (struct bovid *) 0;
29 return foo (&cow, 0);
32 /* { dg-final { scan-tree-dump-times "foo " 1 "eipa_sra" } } */