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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-01
                 CC|                            |dmalcolm at gcc dot gnu.org
            Summary|internal compiler error: in |[7 Regression] internal
                   |lambda_expr_this_capture,   |compiler error: in
                   |at cp/lambda.c:785          |lambda_expr_this_capture,
                   |                            |at cp/lambda.c:785
     Ever confirmed|0                           |1

--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Confirmed that this ICEs gcc 7 (but trunk and gcc 6 don't ICE).

ICE is here in lambda_expr_this_capture:

784           gcc_assert (TYPE_MAIN_VARIANT (TREE_TYPE (current_class_ref))

(gdb) call debug_tree (cfun->language->x_current_class_ref)
 <indirect_ref 0x7ffff0109e80
    type <record_type 0x7ffff0245888 __lambda0 readonly type_5 type_6 DI
        size <integer_cst 0x7ffff18aceb8 constant 64>
        unit size <integer_cst 0x7ffff18aced0 constant 8>
        align 64 symtab 0 alias set -1 canonical type 0x7ffff0245888
        fields <field_decl 0x7ffff0248558 __this type <pointer_type
0x7ffff0245a80>
            used unsigned nonlocal decl_7 DI file /tmp/test.C line 9 col 11
size <integer_cst 0x7ffff18aceb8 64> unit size <integer_cst 0x7ffff18aced0 8>
            align 64 offset_align 128
            offset <integer_cst 0x7ffff18acee8 constant 0>
            bit offset <integer_cst 0x7ffff18acf30 constant 0> context
<record_type 0x7ffff0245d20 __lambda0> chain <type_decl 0x7ffff0248428
__lambda0>> context <function_decl 0x7ffff0249200 operator()>
        full-name "const struct X::operator()()::<lambda(auto:1)>"
        X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown
        pointer_to_this <pointer_type 0x7ffff0245bd0> reference_to_this
<reference_type 0x7ffff02979d8>>
    readonly
    arg 0 <nop_expr 0x7ffff0109e60
        type <pointer_type 0x7ffff0245bd0 type <record_type 0x7ffff0245888
__lambda0>
            unsigned type_6 DI size <integer_cst 0x7ffff18aceb8 64> unit size
<integer_cst 0x7ffff18aced0 8>
            align 64 symtab 0 alias set -1 canonical type 0x7ffff0245bd0>
        readonly
        arg 0 <parm_decl 0x7ffff0266c00 __closure type <pointer_type
0x7ffff024b0a8>
            readonly used unsigned DI file /tmp/test.C line 8 col 25 size
<integer_cst 0x7ffff18aceb8 64> unit size <integer_cst 0x7ffff18aced0 8>
            align 64 context <function_decl 0x7ffff0267e00 operator()> arg-type
<pointer_type 0x7ffff024b0a8> chain <parm_decl 0x7ffff0266c80 D.30370>>>>

Reply via email to