From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8381 invoked by alias); 17 Feb 2012 21:58:06 -0000 Received: (qmail 8373 invoked by uid 22791); 17 Feb 2012 21:58:06 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Feb 2012 21:57:52 +0000 From: "xnko at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52302] New: [4.6.2] cc1plus.exe hungs when compiling Date: Fri, 17 Feb 2012 23:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xnko at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg01830.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52302 Bug #: 52302 Summary: [4.6.2] cc1plus.exe hungs when compiling Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: xnko@hotmail.com trying to compile this code cc1plus hungs, and when debugging in Visual Studio, debugger catches stackoverflow exception. gcc 4.6.2 cpp.cpp: #include #include void open(std::function callback) { callback(); } void read(std::function callback) { auto opencb = ([&]() { int x = 0; return [=]() mutable { x++; callback(); }; })(); open(opencb); } int main(int argc, char **argv) { read([]() {}); return 0; } command line: >g++ -c cpp.cpp -g -Wall -Wextra -std=c++0x -o cpp.o