ICE with nested C++11 lambdas

Bug #1254915 reported by Benjamin Kietzman on 2013-11-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.6 (Ubuntu)

Bug Description

Using gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
on Ubuntu 12.04.3 LTS

$ uname -a
Linux kenpachi 3.2.0-56-generic #86-Ubuntu SMP Wed Oct 23 09:20:45 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ g++ -std=c++0x accgen.cpp -o accgen
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report, ...

    template<typename Inc>
    void test(Inc i) {

    int main() {
            auto foo=[](int& n){return [&](int i){return n+=i;};};
            int n=0;
            return 0;

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers