1 // Test for handling of excessive template recursion.
2 // { dg-options "-ftemplate-depth-50 -O" }
4 template <int I> struct F
8 F<I+1> f; // { dg-error "incomplete type" "incomplete" }
9 // { dg-bogus "exceeds maximum.*exceeds maximum" "exceeds" { xfail *-*-* } 8 }
10 // { dg-error "exceeds maximum" "exceeds" { xfail *-*-* } 8 }
11 return f()*I; // { dg-message "recursively" "recurse" }
15 template <> struct F<52>
17 int operator()() { return 0; }
23 return f(); // { dg-message "from here" "excessive recursion" }
26 // Ignore excess messages from recursion.
27 // { dg-prune-output "from 'int" }