OSDN Git Service

PR c++/26714
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-recursion.C
1 // Test that we catch excessive recursion.
2 // { dg-options "-std=c++0x -fconstexpr-depth=5" }
3 // { dg-prune-output "in constexpr expansion" }
4 constexpr int f (int i) { return f (i-1); }
5 constexpr int i = f(42);        // { dg-error "constexpr evaluation depth" }