3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 27 Nov 2002 <nathan@codesourcery.com>
6 // covariant returns. Fixed offset.
14 virtual B1 *foo1 () {return this;}
15 virtual B2 *foo2 (D *);
19 virtual B2 *baz1 () {return this;}
20 virtual B1 *baz2 (D *);
25 virtual D *foo1 () {return this;}
26 virtual D *foo2 (D *d) {return d;}
27 virtual D *baz1 () {return this;}
28 virtual D *baz2 (D *d) {return d;}
31 B2 *B1::foo2 (D *d) {return d;}
32 B1 *B2::baz2 (D *d) {return d;}
34 int test (B1 *b1, B2 *b2, D *d)
36 if (b1->foo1 () != b1)
38 if (b2->baz1 () != b2)
40 if (b1->foo2 (d) != b2)
42 if (b2->baz2 (d) != b1)
65 if ((r = test (&d, &d, &d)))