blob: 030181404d18bfd5ddc30b54c2ca0030401e36c5 (
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-optimized" } */
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 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|