summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/inline-6.c
blob: ae6c41f5da3a73932a1b20d55391d626917b125f (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
36
37
38
39
40
/* { dg-do compile } */
/* { dg-options "-Os -fdump-tree-optimized" } */
struct a {int a,b,c,d,e,f,g,h,i,j;};

do_inc (struct a *a)
{
  a->a=1;
  a->b=2;
  a->c=3;
  a->e=4;
  a->f=5;
  a->g=5;
  a->h=5;
  a->i=5;
  a->j=5;
}

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" } } */