http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47049
Summary: internal compiler error: in write_unnamed_type_name
due to C++0x lamba use
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 22842
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22842
Preprocessed source
errtest.cpp: In lambda function:
errtest.cpp:16:78: internal compiler error: in write_unnamed_type_name, at
cp/mangle.c:1311
While using a mingw64 build I encountered the above ICE and reported it @
http://sourceforge.net/tracker/?func=detail&atid=983354&aid=3141173&group_id=202880
It was suggested that this is a gcc bug (and it looks like it). I'm using a
lambda in a class template; as follows:
std::sort(v.begin(),v.end(), [&eigenvaluesUnsorted](size_t a, size_t b) -> bool
{ return eigenvaluesUnsorted(a) > eigenvaluesUnsorted(b);});
Attached are the small unpreprocessed source, the huge preprocessed source, and
g++'s output. The command line was:
g++ -I%EIGEN3_DIR% --std=c++0x -march=core2 -v -save-temps errtest.cpp
2>gcc-err.txt