From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29513 invoked by alias); 30 May 2014 15:07:21 -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 Received: (qmail 29469 invoked by uid 48); 30 May 2014 15:07:16 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61362] g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template Date: Fri, 30 May 2014 15:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: daniel.kruegler at googlemail 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-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02555.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61362 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Kr=C3=BCgler --- The code produces an ICE on gcc 4.8.2, 4.9.0, and recent 4.10.0 trunk: "prog.cc: In instantiation of 'struct C::__lambda0': prog.cc:8:7: required from here prog.cc:11:38: internal compiler error: in tsubst_copy, = at cp/pt.c:12116 std::function f =3D [this](N node) { ^ 0x51c1= 4e tsubst_copy ../../gcc-4.8.2/gcc/cp/pt.c:12116 0x51c743 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-4.8.2/gcc/cp/pt.c:14455 0x51c7e2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-4.8.2/gcc/cp/pt.c:14236 0x52b94f instantiate_class_template_1 ../../gcc-4.8.2/gcc/cp/pt.c:9030 0x52= b94f instantiate_class_template(tree_node*) ../../gcc-4.8.2/gcc/cp/pt.c:9088 0x57993d complete_type(tree_node*) ../../gcc-4.8.2/gcc/cp/typeck.c:131 0x51= d448 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-4.8.2/gcc/cp/pt.c:14552 0x592618 perform_member_init ../../gcc-4.8.2/gcc/cp/init.c:538 0x592618 emit_mem_initializers(tree_node*) ../../gcc-4.8.2/gcc/cp/init.c:1109 0x596976 synthesize_method(tree_node*) ../../gcc-4.8.2/gcc/cp/method.c:796 0x54367a mark_used(tree_node*) ../../gcc-4.8.2/gcc/cp/decl2.c:4677 0x4f01ec build_over_call ../../gcc-4.8.2/gcc/cp/call.c:7055 0x4ed698 build_new_method_call_1 ../../gcc-4.8.2/gcc/cp/call.c:7715 0x4ed698 build_new_method_call(tree_node= *, tree_node*, vec**, tree_node*, int, tree_node*= *, int) ../../gcc-4.8.2/gcc/cp/call.c:7785 0x4edf3e build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../gcc-4.8.2/gcc/cp/call.c:7352 0x58f= ec5 expand_default_init ../../gcc-4.8.2/gcc/cp/init.c:1679 0x58fec5 expand_aggr_init_1 ../../gcc-4.8.2/gcc/cp/init.c:1780 0x591a08 build_aggr_init(tree_node*, tree_node*, int, int) ../../gcc-4.8.2/gcc/cp/init.c:1531 0x4fcd9c build_aggr_init_full_exprs ../../gcc-4.8.2/gcc/cp/decl.c:5543 0x4fcd9c check_initializer ../../gcc-4.8.2/gcc/cp/decl.c:5678 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace w= ith any bug report. See for instructions." >>From gcc-bugs-return-452864-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 30 15:10:14 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 694 invoked by alias); 30 May 2014 15:10:13 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 581 invoked by uid 55); 30 May 2014 15:10:04 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56947] [4.7 Regression] Bogus 'XX' was not declared in this scope Date: Fri, 30 May 2014 15:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02556.txt.bz2 Content-length: 521 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56947 --- Comment #4 from Jason Merrill --- Author: jason Date: Fri May 30 15:09:29 2014 New Revision: 211083 URL: http://gcc.gnu.org/viewcvs?rev=211083&root=gcc&view=rev Log: PR c++/56947 * pt.c (instantiate_decl): Don't defer instantiation of a nested function. Added: branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/local8.C Modified: branches/gcc-4_7-branch/gcc/cp/ChangeLog branches/gcc-4_7-branch/gcc/cp/pt.c