URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [recurse.C] - Rev 154
Go to most recent revision | Compare with Previous | Blame | View Log
// Test for handling of excessive template recursion.
// { dg-options "-ftemplate-depth-50 -O" }
template <int I> struct F
{
int operator()()
{
F<I+1> f; // { dg-error "" "" }
return f()*I; // { dg-error "" "" }
}
};
template <> struct F<52>
{
int operator()() { return 0; }
};
int main ()
{
F<1> f;
return f(); // { dg-error "instantiate" "excessive recursion" }
}
Go to most recent revision | Compare with Previous | Blame | View Log