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/] [virtual4.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// Origin: Mark Mitchell 
3
 
4
struct B
5
{
6
  B ();
7
  virtual void f () = 0;
8
};
9
 
10
B::B ()
11
{
12
}
13
 
14
extern B* bp;
15
 
16
template 
17
struct C : public B
18
{
19
  virtual void f ()
20
    {
21
    }
22
};
23
 
24
template 
25
struct D : public B
26
{
27
  virtual void f ()
28
    {
29
      bp = new C;
30
    }
31
};
32
 
33
B* bp = new D;
34
 
35
int main ()
36
{
37
  bp->f ();
38
  bp->f ();
39
}
40
 
41
 

powered by: WebSVN 2.1.0

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