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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [vcall1.C] - Blame information for rev 717

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// { dg-options "-w" }
3
 
4
extern "C" void abort ();
5
 
6
struct B;
7
 
8
B* b;
9
 
10
struct A {
11
  virtual void f () {}
12
};
13
 
14
struct B : virtual public A {
15
  B () {
16
    b = this;
17
    ((A*) this)->f ();
18
  }
19
 
20
  virtual void f () {
21
    if (this != b)
22
      abort ();
23
  }
24
};
25
 
26
struct C : public B {
27
};
28
 
29
struct D : public C, public B {
30
  virtual void f () {}
31
};
32
 
33
int main () {
34
  D d;
35
}
36
 

powered by: WebSVN 2.1.0

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