blob: d227ff9aaa32756f9c4290b84133937718423f96 (
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 "-O -fdump-tree-optimized" }
struct pf
{
inline pf(int(*x)(int)) : x(x) {}
inline int operator()(int a) const
{
return x(a);
}
int (*x)(int);
};
inline int g(int x) { return x/x - 1; }
int main(int argc, char* argv[])
{
pf f(g);
return f(3);
}
// { dg-final { scan-tree-dump "return 0" "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
|