------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-29 23:08 ------- Shorter testcase: template <typename T> struct F; template <typename T> F<T> &operator<<(F<T>&, const char*); template<typename T> struct F { friend F& operator<< <>(F&, const char*); }; typedef F<char> F1; template<typename> struct X; typedef X<int> X2; F1& operator<< (F1&, const X2&); template<typename> struct X { static void foo(); friend F1& operator<< (F1&, const X2&); }; template<typename T>void X<T>::foo() { F1 g; g <<""; } ----- Commenting out the following ggc_free: /* The NEWDECL will no longer be needed. Because every out-of-class declaration of a member results in a call to duplicate_decls, freeing these nodes represents in a significant savings. */ ggc_free (newdecl);
makes the testcase to work. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmitchel at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24173