Command line: g++ testcase.cpp ------ testcase.cpp ------ namespace std { template < typename > void swap (); } template std::swap --------------------------
Tested revisions: r156745 - crash r153685 - crash 4.4 r156256 - OK Output - 4.4: $ /mnt/svn/gcc-4_4/binary-156256-enable-checking/bin/g++ testcase.cpp testcase.cpp:5: error: ISO C++ forbids declaration of ‘swap’ with no type testcase.cpp:5: error: explicit instantiation of non-template ‘int std::swap’ testcase.cpp:5: error: expected ‘;’ at end of input Output - trunk: $ /mnt/svn/gcc-trunk/binary-156745-lto/bin/g++ testcase.cpp testcase.cpp:5:15: error: ISO C++ forbids declaration of ‘swap’ with no type testcase.cpp:5:15: internal compiler error: tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in set_decl_namespace, at cp/name-lookup.c:3105 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in set_decl_namespace, at cp/name-lookup.c:3105 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43069