2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-6.c
blob89909f03307e1da9d1a8e97e4703ef0b369aec90
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" } } */