URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// GROUPS passed code-generation
|
// GROUPS passed code-generation
|
// code-gen file
|
// code-gen file
|
// From: Gunther Seitz
|
// From: Gunther Seitz
|
// Date: Thu, 18 Mar 1993 10:45:29 +0100
|
// Date: Thu, 18 Mar 1993 10:45:29 +0100
|
// Message-ID: <93Mar18.104538met.1094@regatta.regent.e-technik.tu-muenchen.de>
|
// Message-ID: <93Mar18.104538met.1094@regatta.regent.e-technik.tu-muenchen.de>
|
|
|
|
|
#include
|
#include
|
|
|
class X {
|
class X {
|
|
|
public:
|
public:
|
double x;
|
double x;
|
X () { x=3.5; } // Here we go. This assignment fails because
|
X () { x=3.5; } // Here we go. This assignment fails because
|
// of X::x being aligned on a doubleword
|
// of X::x being aligned on a doubleword
|
// boundary, not a quadword one.
|
// boundary, not a quadword one.
|
};
|
};
|
|
|
|
|
class A : public virtual X {}; // Only way to produce the
|
class A : public virtual X {}; // Only way to produce the
|
class B : public virtual X {}; // error is to use this
|
class B : public virtual X {}; // error is to use this
|
class C : public virtual X {}; // construct of virtual
|
class C : public virtual X {}; // construct of virtual
|
// base classes.
|
// base classes.
|
|
|
class Y : public A, public B, public C {};
|
class Y : public A, public B, public C {};
|
|
|
|
|
int main ()
|
int main ()
|
{
|
{
|
Y y; // To call the constructor
|
Y y; // To call the constructor
|
printf ("PASS\n");
|
printf ("PASS\n");
|
}
|
}
|
|
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.