The following testcase triggers an ICE when compiled with "-fmudflap -O":
============================================== template<typename> struct A { typedef int X; static const int N = 1; }; template<typename T> struct B { typedef typename A<int[A<T>::N]>::X Y; template<typename U> B(Y, U) {} }; B<int> b(0, 0); ============================================== bug.cc: In instantiation of 'const int A<int>::N': bug.cc:13: instantiated from here bug.cc:4: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] The bug dates back to GCC 4.0.0 (when "-fmudflap" was introduced). -- Summary: ICE with "-fmudflap" and templates Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34619