http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16564
--- Comment #18 from Volker Reichelt <reichelt at gcc dot gnu.org> --- The reduced testcases from comment #3 and #4 compile within split-seconds since GCC 4 5.0. This is partially due to Manuel's fix for PR 23510. However, the original testcase still takes a veeeeery long time. This can be demonstrated with the following reduced testcase: ================================ template<typename> struct A { A<A> a; A() {} }; A<int> a; ================================ The first error message about exceeding the maximum template instantiation depth appears rather quickly. So maybe we could make the first error message a fatal one to avoid further processing of potentially bogus nested classes.