http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56163
Bug #: 56163 Summary: Template instantiation limit not kicking in Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: ja...@gcc.gnu.org template <class U> struct B { typedef void type; }; template <bool U> struct C { }; template <typename T, typename E = void> struct D { static const bool d = false; }; template <typename T> struct D<T, typename B<C<D<T>::d > >::type> { static const bool d = false; }; D<double> d; reduced from https://bugzilla.redhat.com/show_bug.cgi?id=904652 segfaults due to endless recursion during instantiation, -ftemplate-depth= limit doesn't seem to affect this. This ICEd already with 3.2, so might not be a regression.