This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-22
                 CC|                            |dmalcolm at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this report.

Confirmed.  Both ICEs started with r253265.

The first ICE (testcase in comment #0) happens at line 446 of lambda.c in
build_capture_proxy here:

441       if (DECL_NORMAL_CAPTURE_P (member))
442         {
443           if (DECL_VLA_CAPTURE_P (member))
444             {
445               init = CONSTRUCTOR_ELT (init, 0)->value;
446               init = TREE_OPERAND (init, 0); // Strip ADDR_EXPR.
447               init = TREE_OPERAND (init, 0); // Strip ARRAY_REF.
448             }

where "init" is error_mark.


The second ICE (testcase in comment #1):

Happens at line 288 of lambda.c in is_normal_capture_proxy here:
288       gcc_assert (TREE_CODE (val) == COMPONENT_REF);

where val is a NOP_EXPR around a COMPONENT_REF (casting from T* to reference to
T[]).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]