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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-ftemplate-depth-15" }
3
template
4
struct Factorial
5
{
6
  enum { nValue = nFactor * Factorial::nValue }; // { dg-error "depth exceeds maximum" }
7
  // { dg-message "recursively required" "" { target *-*-* } 6 }
8
  // { dg-error "incomplete type" "" { target *-*-* } 6 }
9
} // { dg-error "expected ';' after" }
10
 
11
  template<>
12
  struct Factorial<0>
13
  {
14
    enum { nValue = 1 };
15
  };
16
 
17
    static const unsigned int FACTOR = 20;
18
 
19
int main()
20
{
21
  Factorial::nValue;
22
  return 0;
23
}

powered by: WebSVN 2.1.0

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