1 /* We should specialize for &b and devirtualize the call.
2 Previously we were failing by considering CLOBBER statement to be
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -fdump-ipa-cp" } */
6 /* { dg-additional-options "-Wno-return-type" } */
9 void operator==(const A &);
16 template <typename T, typename M> class C {
19 const M &m_fn2(const T &);
20 virtual void m_fn1() {}
25 template <typename T, typename M> const M &C<T, M>::m_fn2(const T &) {
31 void fn1() { b.m_fn2(0); }
32 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */