1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 4 Apr 2005 <nathan@codesourcery.com>
6 // PR 20746: Covariant return pointer could be null.
8 // Origin: yanliu@ca.ibm.com
9 // nathan@codesourcery.com
25 B *B::Two() {return this;}
26 B &B::Three() {return *this;}
27 C *C::Two () {return 0;}
28 C &C::Three () {return *(C *)0;}
44 /* We should not adjust a null pointer. */
47 /* But we should adjust a (bogus) null reference. */