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 &#8216;swap&#8217; with
no type
testcase.cpp:5: error: explicit instantiation of non-template &#8216;int
std::swap&#8217;
testcase.cpp:5: error: expected &#8216;;&#8217; 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 &#8216;swap&#8217;
with no type
testcase.cpp:5:15: internal compiler error: tree check: expected tree that
contains &#8216;decl minimal&#8217; structure, have &#8216;overload&#8217; 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 &#8216;decl
                    minimal&#8217; structure, have &#8216;overload&#8217; 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

Reply via email to