Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / g++.old-deja / g++.jason / ref10.C
blob4fe6ffdaf43f5a016c9b5300dd033aa2137adaae
1 // { dg-do run  }
2 // Test that conversion from D* to B*& works properly.
4 extern "C" int printf (const char *, ...);
6 struct V {
7   int a;
8 };
10 struct B: virtual V {
11   int b;
14 struct D: B {
15   int c;
18 V* gp = 0;
20 void foo(V * const &r) {
21   gp = r;
24 int bar(V *r) {
25   return (r != gp);
28 int main() {
29   D *p = new D;
30   foo(p);
31   return bar(p);