OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [recurse.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test for handling of excessive template recursion.
2
// { dg-options "-ftemplate-depth-50 -O" }
3
 
4
template  struct F
5
{
6
  int operator()()
7
    {
8
      F 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" }
12
    }
13
};
14
 
15
template <> struct F<52>
16
{
17
  int operator()() { return 0; }
18
};
19
 
20
int main ()
21
{
22
  F<1> f;
23
  return f();           // { dg-message "from here" "excessive recursion" }
24
}
25
 
26
// Ignore excess messages from recursion.
27
// { dg-prune-output "from 'int" }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.