https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64139
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |trippels at gcc dot gnu.org Summary|[5 Regression] ice in |[4.9/5 Regression] ice in |possible_polymorphic_call_t |possible_polymorphic_call_t |argets, at |argets, at |ipa-devirt.c:2410 |ipa-devirt.c:2410 Known to fail| |4.9.1, 5.0 --- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- reduced test case: class IObject { public: virtual ~IObject(); }; class A { virtual int m_fn1(); }; class B { public: virtual int m_fn2(B) const; }; class D : IObject, public virtual B {}; class G : public D, A { public: G(A); }; class F : B { friend class C; }; class C { void m_fn3(const IObject &, int &); void m_fn4(const B &, int &); }; A a; void C::m_fn3(const IObject &, int &p2) { G r(a); m_fn4(r, p2); } void C::m_fn4(const B &p1, int &) { F b; p1.m_fn2(b); } Also ICEs with gcc-4.9: trippels@gcc20 ~ % g++ -c -O2 bug178.cc bug178.cc: In member function ‘void C::m_fn3(const IObject&, int&)’: bug178.cc:32:1: internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1557