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" } */
7 void operator==(const A &);
14 template <typename T, typename M> class C {
17 const M &m_fn2(const T &);
18 virtual void m_fn1() {}
23 template <typename T, typename M> const M &C<T, M>::m_fn2(const T &) {
29 void fn1() { b.m_fn2(0); }
30 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */
31 /* { dg-final { cleanup-ipa-dump "cp" } } */