ICE with nested C++11 lambdas

Bug #1254915 reported by Benjamin Kietzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.6 (Ubuntu)
New
Undecided
Unassigned

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, ...

    //accgen.cpp:
    template<typename Inc>
    void test(Inc i) {
    }

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.