1 // PR tree-optimization/37095 2 // { dg-options "-O" } 3 4 struct A 5 { 6 virtual A *foo (); 7 }; 8 9 struct B : virtual A 10 { fooB11 virtual B *foo () { return 0; } 12 }; 13 14 B b; 15