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.0rc3/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [net35.C] - Rev 839
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
extern "C" int printf(const char *, ...);
class A {
public:
char *x;
};
class B1:public virtual A { };
class B2:public virtual A { };
class C:public B1, public B2 {
public:
C() { }
};
int main() {
C c;
printf("&c.x = %x\n", &c.x);
printf("&c.B1::x = %x\n", &c.B1::x);
printf("&c.B2::x = %x\n", &c.B2::x);
printf("&c.A::x = %x\n", &c.A::x);
if (&c.x != &c.B1::x
|| &c.x != &c.B2::x
|| &c.x != &c.A::x)
return 1;
}
Go to most recent revision | Compare with Previous | Blame | View Log