aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/inline-1.c
blob: bbf7e83aacf7098e45af85e16ccad89fca6e4b83 (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
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-final_cleanup" } */


typedef struct {
  double min;
  double max;
} interval;
inline interval add(interval x, interval y)  __attribute__((always_inline));
inline interval add(interval x, interval y)  
{
  interval r;
  r.min = x.min + y.min;
  r.max = x.max + y.max;
  return r;
}
interval foo (interval a, interval b, interval c)
{
  return add (a, add (b, c));
}


/* { dg-final { scan-tree-dump-times "\(struct interval\)" 0 "final_cleanup"} } */
/* { dg-final { cleanup-tree-dump "final_cleanup" } } */