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;}};
15 /* We should guess that the pointer of type B probably points to an instance
16 of B or its derivates and exclude A::t from list of likely targets. */
18 /* { dg-final { scan-ipa-dump "Targets that are not likely" "devirt" } } */
19 /* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */
20 /* { dg-final { cleanup-ipa-dump "devirt" } } */