1/* { dg-do compile } */
2/* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-slim"  } */
3/* { dg-require-effective-target non_strict_align } */
4
5struct bovid
6{
7  float a;
8  int b;
9  struct bovid *next;
10};
11
12static int
13__attribute__((noinline))
14foo (struct bovid *cow, int i)
15{
16  i++;
17  if (cow->next)
18    foo (cow->next, i);
19  return i;
20}
21
22int main (int argc, char *argv[])
23{
24  struct bovid cow;
25
26  cow.a = 7.4;
27  cow.b = 6;
28  cow.next = (struct bovid *) 0;
29
30  return foo (&cow, 0);
31}
32
33/* { dg-final { scan-tree-dump-times "foo " 1 "eipa_sra"  } } */
34/* { dg-final { cleanup-tree-dump "eipa_sra" } } */
35