summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/inline-5.c
blob: 1a6faf4c5001a1e9588531ea1cdb7a27702b0b4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* { dg-do compile } */
/* { dg-options "-Os -fdump-tree-optimized" } */
struct a {int a,b,c,d,e,f;};

do_inc (struct a *a)
{
  a->a=a->b;
  a->b=a->c;
  a->c=a->d;
  a->e=a->f;
}

test(struct a *a)
{
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
  do_inc (a);
  do_something (a);
}
/* { dg-final { scan-tree-dump-times "do_inc" 12 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */