public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function @ 2011-09-16 20:16 zeratul976 at hotmail dot com 2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: zeratul976 at hotmail dot com @ 2011-09-16 20:16 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Bug #: 50437 Summary: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: zeratul976@hotmail.com The following trivial use of a lambda in a template function: template <typename T> void f() { auto g = [](T t){ return t == 0; }; g(T()); } int main() { f<int>(); } Gives the following ICE with GCC 4.7.0-20110910: test.cpp: In instantiation of 'void f() [with T = int]': test.cpp:10:12: required from here test.cpp:5:5: internal compiler error: in cxx_incomplete_type_diagnostic, at cp/typeck2.c:459 GCC 4.6.1 compiles the code successfully. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com @ 2011-09-22 17:18 ` paolo.carlini at oracle dot com 2011-09-29 13:20 ` rguenth at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2011-09-22 17:18 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-09-22 CC| |jason at gcc dot gnu.org Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com 2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com @ 2011-09-29 13:20 ` rguenth at gcc dot gnu.org 2011-10-10 14:07 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-09-29 13:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.7.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com 2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com 2011-09-29 13:20 ` rguenth at gcc dot gnu.org @ 2011-10-10 14:07 ` rguenth at gcc dot gnu.org 2011-10-13 19:30 ` jason at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-10-10 14:07 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com ` (2 preceding siblings ...) 2011-10-10 14:07 ` rguenth at gcc dot gnu.org @ 2011-10-13 19:30 ` jason at gcc dot gnu.org 2011-10-13 21:24 ` jason at gcc dot gnu.org 2011-10-13 21:33 ` jason at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2011-10-13 19:30 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com ` (3 preceding siblings ...) 2011-10-13 19:30 ` jason at gcc dot gnu.org @ 2011-10-13 21:24 ` jason at gcc dot gnu.org 2011-10-13 21:33 ` jason at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2011-10-13 21:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 --- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-13 21:23:42 UTC --- Author: jason Date: Thu Oct 13 21:23:36 2011 New Revision: 179944 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179944 Log: PR c++/50437 * cp-tree.h (struct tree_lambda_expr): Add closure field. (LAMBDA_EXPR_CLOSURE): New. * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Likewise. * semantics.c (build_lambda_object): Use it instead of TREE_TYPE. (begin_lambda_type, lambda_function, add_capture): Likewise. (add_default_capture, lambda_expr_this_capture): Likewise. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/50437] [C++0x] [4.7 regression] ICE for trivial use of lambda in template function 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com ` (4 preceding siblings ...) 2011-10-13 21:24 ` jason at gcc dot gnu.org @ 2011-10-13 21:33 ` jason at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2011-10-13 21:33 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50437 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-13 21:32:09 UTC --- Fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-13 21:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com 2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com 2011-09-29 13:20 ` rguenth at gcc dot gnu.org 2011-10-10 14:07 ` rguenth at gcc dot gnu.org 2011-10-13 19:30 ` jason at gcc dot gnu.org 2011-10-13 21:24 ` jason at gcc dot gnu.org 2011-10-13 21:33 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).