[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 --- Comment #6 from Jakub Jelinek 2012-12-07 16:27:14 UTC --- (In reply to comment #5) > If you want me to revert that patchlet of mine don't be afraid to ask, after > all was just an ice on invalid, no big deal. Can do that immediately and then > we have all the time to figure out something better with no fear of > regressions, even minor. This is also an ice-on-invalid, so trading one for another one doesn't buy us much. And, don't we ICE for the testcase with template anyway?
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 --- Comment #5 from Paolo Carlini 2012-12-07 16:20:35 UTC --- If you want me to revert that patchlet of mine don't be afraid to ask, after all was just an ice on invalid, no big deal. Can do that immediately and then we have all the time to figure out something better with no fear of regressions, even minor.
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org --- Comment #4 from Jakub Jelinek 2012-12-07 15:54:22 UTC --- And struct A; template void foo(A& a) { [=](){a;}; } void bar (A&a) { foo<6>(a); } ICEs even without -fkeep-inline-functions elsewhere. I wonder if else /* Capture by copy requires a complete type. */ type = complete_type (type); in semantics.c (add_capture) shouldn't be something like: --- cp/semantics.c.jj2012-12-06 21:33:57.0 +0100 +++ cp/semantics.c2012-12-07 16:45:30.0 +0100 @@ -9164,7 +9164,14 @@ add_capture (tree lambda, tree id, tree } else /* Capture by copy requires a complete type. */ -type = complete_type (type); +{ + if (processing_template_decl) +type = complete_type (type); + else +type = complete_type_or_else (type, initializer); + if (type == NULL_TREE) +type = error_mark_node; +} /* Add __ to the beginning of the field name so that user code won't find the field with name lookup. We can't just leave the name This fixes the ICE in #c0 (but we error twice for the incomplete type, once within the lambda, once within the parent function). For templates it of course doesn't change anything, we I think generally can't require the type to be complete there, so it must be done later during pt.c.
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 Jakub Jelinek changed: What|Removed |Added Target Milestone|4.7.2 |4.7.3 --- Comment #3 from Jakub Jelinek 2012-09-20 10:19:02 UTC --- GCC 4.7.2 has been released.
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 --- Comment #2 from Paolo Carlini 2012-09-07 08:35:41 UTC --- Bah, in my opinion ranking P2 an ice on invalid after meaningful diagnostics, which moreover happens on a testcase which used to ice anyway before my patch, only, without the keep-inline-functions on the command line, doesn't look right. Anyway, I'll see what I can do, for .0 we may have to revert my patch.
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 Richard Guenther changed: What|Removed |Added Priority|P3 |P2
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 Richard Guenther changed: What|Removed |Added Target Milestone|--- |4.7.2
[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53696 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-06-16 CC||paolo.carlini at oracle dot ||com Ever Confirmed|0 |1 --- Comment #1 from H.J. Lu 2012-06-16 17:48:52 UTC --- It is caused by revision 185722: http://gcc.gnu.org/ml/gcc-cvs/2012-03/msg01052.html