1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1" } */
6 template<typename predicate>
10 explicit noop_t(const predicate &p) : pred(p) {}
12 int operator()() const { return pred(); }
15 template<typename predicate>
16 inline noop_t<predicate> noop(const predicate pred) {
17 return noop_t<predicate>(pred);
22 return (noop(noop(noop(noop(noop(noop(noop(noop(noop(f)))))))))());
25 /* We should optimize this to a direct call. */
27 /* { dg-final { scan-tree-dump-times "= f \\(\\);" 1 "fre1" } } */