[Bug c++/65284] [5 Regression] C++ lambda and auto return value causes ICE or gimple error
aldyh at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 6 22:44:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65284
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34959|0 |1
is obsolete| |
--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 34977
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34977&action=edit
smaller and simpler testcase
In cp_simplify_init_expr(), we are lowering part of the return
statement for the lambda function from this:
*NON_LVALUE_EXPR <this> = TARGET_EXPR <D.2173, <<< Unknown tree: aggr_init_expr
4
__comp_ctor
D.2173
NON_LVALUE_EXPR <this> >>>>;
into:
<<< Unknown tree: aggr_init_expr
4
__comp_ctor
*NON_LVALUE_EXPR <this> <-- notice we've dropped D.2173
NON_LVALUE_EXPR <this> >>>;
This last blob cannot be stored into retval because the value of the
aggr_init_expr is a read from the constructor which has a void return type.
More information about the Gcc-bugs
mailing list