URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [ref10.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// Test that conversion from D* to B*& works properly.
extern "C" int printf (const char *, ...);
struct V {
int a;
};
struct B: virtual V {
int b;
};
struct D: B {
int c;
};
V* gp = 0;
void foo(V * const &r) {
gp = r;
}
int bar(V *r) {
return (r != gp);
}
int main() {
D *p = new D;
foo(p);
return bar(p);
}
Go to most recent revision | Compare with Previous | Blame | View Log