1178768Simp// { dg-do compile }
2178768Simp// { dg-options "-ftemplate-depth-15" }
3178768Simptemplate<unsigned int nFactor>
4178768Simpstruct Factorial
5178768Simp{
6178768Simp  enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth" }
7178768Simp};
8178768Simp
9178768Simptemplate<>
10178768Simpstruct Factorial<0>
11178768Simp{
12178768Simp  enum { nValue = 1 };
13178768Simp};
14178768Simp
15178768Simpstatic const unsigned int FACTOR = 20;
16178768Simp
17178768Simpint main()
18199243Sed{
19220154Sed  Factorial<FACTOR>::nValue;  // { dg-message "from here" }
20220154Sed  return 0;
21178768Simp}
22178768Simp
23178768Simp// { dg-prune-output "compilation terminated" }
24178768Simp