URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// Red Hat bugzilla 64535
|
// Red Hat bugzilla 64535
|
// Bug: We are allocationg stuff into the tail padding of POD class "A".
|
// Bug: We are allocationg stuff into the tail padding of POD class "A".
|
// { dg-do run }
|
// { dg-do run }
|
|
|
struct A
|
struct A
|
{
|
{
|
int x;
|
int x;
|
char y;
|
char y;
|
};
|
};
|
|
|
struct B : public A {
|
struct B : public A {
|
virtual void f () {}
|
virtual void f () {}
|
char z;
|
char z;
|
};
|
};
|
|
|
A a = { 21, 42 };
|
A a = { 21, 42 };
|
B b;
|
B b;
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
b.x = 12;
|
b.x = 12;
|
b.y = 24;
|
b.y = 24;
|
b.z = 36;
|
b.z = 36;
|
|
|
A *ap = &b;
|
A *ap = &b;
|
|
|
*ap = a;
|
*ap = a;
|
|
|
return (b.z != 36);
|
return (b.z != 36);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.