PR c/56980
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-6.c
blob487e72ef4ca1b5582173c8365b0ef6df8cbcd346
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-slim" } */
3 /* { dg-require-effective-target non_strict_align } */
5 struct bovid
7 float a;
8 int b;
9 struct bovid *next;
12 static int
13 __attribute__((noinline))
14 foo (struct bovid *cow, int i)
16 i++;
17 if (cow->next)
18 foo (cow->next, i);
19 return i;
22 int main (int argc, char *argv[])
24 struct bovid cow;
26 cow.a = 7.4;
27 cow.b = 6;
28 cow.next = (struct bovid *) 0;
30 return foo (&cow, 0);
33 /* { dg-final { scan-tree-dump-times "foo " 1 "eipa_sra" } } */
34 /* { dg-final { cleanup-tree-dump "eipa_sra" } } */