http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58914
Bug ID: 58914 Summary: Internal compiler error when using lambdas as default parameters in static methods Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kknb1056 at gmail dot com Created attachment 31107 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31107&action=edit Preprocessed file I get this message when I try and compile: testMain.cpp: In static member function 'static void SomeClassName::calculateBinning(T_outputContainer&, const T_inputContainer&, std::function<float(typename T_inputContainer::const_iterator)>) [with T_outputContainer = std::vector<float>, T_inputContainer = std::vector<float>, typename T_inputContainer::const_iterator = __gnu_cxx::__normal_iterator<const float*, std::vector<float> >]': testMain.cpp:59:55: internal compiler error: in tsubst_copy, at cp/pt.c:11354 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Command to compile is "g++ -std=gnu++0x testMain.cpp" Output of "gcc -v" is: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/xtaldaq/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --disable-multilib --disable-nls --enable-languages=c,c++,fortran --enable-gold=yes --enable-lto --with-gmp=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --with-mpfr=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --with-mpc=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --with-ppl=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --with-cloog=/build/ge/build-BOOTSTRAP_slc5_amd64_gcc462/b/tmp/BUILDROOT/84ea371043915a09039b845144c4c79e/opt/cmssw/slc5_amd64_gcc462/external/gcc/4.6.2 --enable-cloog-backend=isl --enable-shared CC='gcc -fPIC' CXX='c++ -fPIC' CPP=cpp CXXCPP='c++ -E' Thread model: posix gcc version 4.6.2 (GCC)