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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [spec15.C] - Blame information for rev 519

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
extern "C" void abort();
3
 
4
template 
5
struct S1
6
{
7
  static void f();
8
};
9
 
10
template <>
11
void S1::f() {}
12
 
13
struct S2
14
{
15
  template 
16
  static void g(T);
17
};
18
 
19
template <>
20
void S2::g(double) {}
21
 
22
template <>
23
void S2::g(int) {}
24
 
25
template 
26
struct S3
27
{
28
  template 
29
  static int h(U);
30
};
31
 
32
template <>
33
template <>
34
int S3::h(int) { return 0; }
35
 
36
template <>
37
template <>
38
int S3::h(int) { return 1; }
39
 
40
int main()
41
{
42
  S1::f();
43
  S2::g(3.0);
44
  S2::g(7);
45
 
46
  if (S3::h(7) != 0)
47
    abort();
48
  if (S3::h(7) != 1)
49
    abort();
50
}

powered by: WebSVN 2.1.0

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