http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48280
Summary: [4.5/4.6/4.7 Regression] [C++0x] ICE: tree check: expected var_decl or function_decl, have template_decl in check_bases_and_members, at cp/class.c:4695 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz ----- testcase.C ----- struct S { template < typename > S (const S &) = default; }; ---------------------- Compiler output: $ gcc -std=c++0x testcase.C testcase.C:2:41: error: 'S::S(const S&)' cannot be defaulted testcase.C:1:8: internal compiler error: tree check: expected var_decl or function_decl, have template_decl in check_bases_and_members, at cp/class.c:4695 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r171399 - crash 4.6 r170955 - crash 4.5 r170955 - crash 4.4 r170955 - OK