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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [pr23510.C] - Blame information for rev 307

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 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 "skipping 5 instantiation contexts" "" { target *-*-* } 6 }
8
  // { dg-error "incomplete type" "" { target *-*-* } 6 }
9
}
10
 
11
  template<> // { dg-error "expected" }
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.