1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp" } */
10 virtual int m_fn1() { return 0; }
11 A &operator[](int p1) {
14 static_cast<void>(__builtin_expect(a, 0) ?: 0);
15 return B::operator[](p1);
21 static void sort(C &p1, C &p2) {
29 void lookupSourceDone() { b[0]; }
31 void update_sources() {
37 /* Note that we miss one devirtualization because we are not able to track the
38 vtbl store in destructor.
39 Previously we devirtualized to C::m_fn1 instead of B::m_fn1. */
40 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */
41 /* { dg-final { cleanup-ipa-dump "cp" } } */