From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9684 invoked by alias); 30 Jun 2011 20:31:49 -0000 Received: (qmail 9671 invoked by uid 22791); 30 Jun 2011 20:31:48 -0000 X-SWARE-Spam-Status: No, hits=-2.7 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; Thu, 30 Jun 2011 20:31:35 +0000 From: "3dw4rd at verizon dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49598] New: Ice on lambda with implicit capture by value. 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: 3dw4rd at verizon dot net 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" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 30 Jun 2011 20:31:00 -0000 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: 2011-06/txt/msg03023.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49598 Summary: Ice on lambda with implicit capture by value. Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: 3dw4rd@verizon.net I have a brand new (r175707) 4.7 build on x86_64 GNU/Linux. I saw an error with lambdas on stackoverflow: ----------------------------------------------- #include using std::cout; using std::endl; int main() { int i =3D 10; int& ir =3D i; [=3D] // [i, ir] explicit capture works. { cout << "value capture" << endl << "i: " << i << endl << "ir: " << ir << endl << "&i: " << &i << endl << "&ir: " << &ir << endl << endl; }(); } ----------------------------------------------- This is reduced somewhat. I get: ----------------------------------------------- [ed@localhost ~]$ ./bin/bin/g++ -std=3Dc++0x -o lamb2 lamb2.cpp lamb2.cpp: In function =E2=80=98int main()=E2=80=99: lamb2.cpp:10:1: error: non-trivial conversion at assignment int int & D.28407.__ir =3D ir; lamb2.cpp:10:1: internal compiler error: verify_gimple failed Please submit a full bug report, with preprocessed source if appropriate. See for instructions. -----------------------------------------------