URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// { dg-do run }
|
// { dg-do run }
|
|
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 14 Mar 2003
|
// Contributed by Nathan Sidwell 14 Mar 2003
|
|
|
// PR 9629. The vtable is not set up until the base initializers have
|
// PR 9629. The vtable is not set up until the base initializers have
|
// run.
|
// run.
|
|
|
struct A {
|
struct A {
|
static A *a;
|
static A *a;
|
A ();
|
A ();
|
};
|
};
|
A *A::a;
|
A *A::a;
|
A::A () {a = this;}
|
A::A () {a = this;}
|
|
|
struct B {
|
struct B {
|
static A *a;
|
static A *a;
|
B (A *);
|
B (A *);
|
};
|
};
|
A *B::a;
|
A *B::a;
|
B::B(A *a_) {a = a_;}
|
B::B(A *a_) {a = a_;}
|
|
|
struct C : virtual public A, public B {
|
struct C : virtual public A, public B {
|
C();
|
C();
|
};
|
};
|
C::C () : B(this) {}
|
C::C () : B(this) {}
|
|
|
struct D : virtual public C {};
|
struct D : virtual public C {};
|
|
|
int main()
|
int main()
|
{
|
{
|
new D();
|
new D();
|
return A::a != B::a;
|
return A::a != B::a;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.