Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr46987.C
blob7163915a29856fd83f233663b562db4fc1eba45d
1 /* { dg-do compile } */
2 /* { dg-options "-O" } */
4 struct A {
5   virtual A *getThis();
6 };
8 struct B {
9   virtual B *getThis();
12 struct AB : public A, public B {
13   virtual AB *getThis() { return 0; }
16 void foo ()
18   AB ab;
19   B *b = &ab;
20   b->getThis();