1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-reference" } */
6 template <unsigned long long L> class fib {
8 static const unsigned long long value = fib<L - 1>::value + fib<L - 2>::value;
11 template <> class fib<0> {
13 static const unsigned long long value = 1;
16 template <> class fib<1> {
18 static const unsigned long long value = 1;
21 template<unsigned long long L> inline unsigned long long fibconst()
23 return fibconst<L - 1>() + fibconst<L - 2>();
26 template <> inline unsigned long long fibconst<0>()
31 template <> inline unsigned long long fibconst<1>()
36 template <> inline unsigned long long fibconst<2>()
45 ::std::cerr << "fib<90>::value == " << fib<90>::value << "\n";
46 ::std::cerr << "fibcst<90>() == " << fibconst<90>() << "\n";
48 // { dg-final { scan-tree-dump-not "fibconst" "optimized" } }