https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65288
Bug ID: 65288 Summary: [5 Regression] ICE (in address_matters_p, at symtab.c:1908) on powerpc64le-linux-gnu Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org r221115 on arm-linux-gnu $ g++ -std=c++11 -c -g -O3 -fPIE mainwindow2.ii mainwindow2.ii:61:1: internal compiler error: in address_matters_p, at symtab.c:1908 } ^ Please submit a full bug report, with preprocessed source if appropriate. $ cat mainwindow2.ii class A { public: A(int); }; template <typename...> struct B; template <typename> struct C; template <class Obj, typename Ret, typename... Args> struct C<Ret (Obj::*)(Args...)> { typedef Obj Object; typedef B<Args...> Arguments; }; class D; template <typename> struct F { static const int *types() { static const int t[]{}; return t; } }; class G { A m_ref; public: G(void(int, G *, D *, void **, bool *)) : m_ref(1) {} }; template <typename Func> class J : public G { static void impl(int, G *, D *, void **, bool *); public: J(Func) : G(impl) {} }; class D { public: template <typename Func1, typename Func2> void connect(typename C<Func1>::Object *, Func1, typename C<Func2>::Object *, Func2 p4) { const int *a = F<typename C<Func1>::Arguments>::types(); connectImpl(new J<Func2>(p4), a); } void connectImpl(G *, const int *); }; class H; class K : D { void makeConnections(int *, H *); }; class I { public: void setColor(); void colorChanged(int); }; class H { public: void colorChanged(); void setColor(); }; void K::makeConnections(int *, H *p2) { connect(p2, &H::colorChanged, 0, &I::setColor); connect(0, &I::colorChanged, p2, &H::setColor); }