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.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [explicit57.C] - Blame information for rev 305

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
extern "C" void abort ();
3
 
4
int a = 0;
5
 
6
template  void f ();
7
template  void g ()
8
{
9
  if (a)
10
    abort ();
11
}
12
 
13
template <> void g ()
14
{
15
}
16
 
17
template  class C
18
{
19
  public:
20
    void ff () { f (); }
21
    void gg () { g (); }
22
};
23
 
24
template  void f ()
25
{
26
  if (a)
27
    abort ();
28
}
29
 
30
template <> void f ()
31
{
32
}
33
 
34
int main ()
35
{
36
  C c;
37
  c.ff();
38
  c.gg();
39
  a = 1;
40
  C d;
41
  d.ff();
42
  d.gg();
43
}

powered by: WebSVN 2.1.0

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