1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-devirt" } */
3 struct A {virtual int t(){return 42;}};
4 struct B:A {virtual int t(){return 1;}};
17 /* We should guess that the pointer of type B probably points to an instance
18 of B or its derivates and exclude A::t from list of likely targets. */
20 /* { dg-final { scan-ipa-dump "Speculative targets" "devirt" } } */
21 /* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */