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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And this variation gives an ICE:

    void sink(...) { }

    auto const pack = [](auto... t)
    {
        [&]
        {
           sink( static_cast<decltype(t)>(t)... );
        };
    };

    int main() {
        pack(1);
    }

ll.cc: In instantiation of ‘<lambda(auto:1 ...)>::<lambda()> [with auto:1 =
{int}]’:
ll.cc:7:43:   required from ‘struct<lambda(auto:1 ...)> [with auto:1 =
{int}]::<lambda()>’
ll.cc:5:9:   required from ‘<lambda(auto:1 ...)> [with auto:1 = {int}]’
ll.cc:12:15:   required from here
ll.cc:7:16: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:572
            sink( static_cast<decltype(t)>(t)... );
                ^
0x615fb9 cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*,
diagnostic_t)
        /home/jwakely/src/gcc/gcc/cp/typeck2.c:572
0x6ba1c4 complete_type_or_maybe_complain(tree_node*, tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:153
0x6ba279 require_complete_type_sfinae(tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:90
0x552061 convert_arg_to_ellipsis(tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/call.c:6565
0x557e37 build_over_call
        /home/jwakely/src/gcc/gcc/cp/call.c:7265
0x56dfcb build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        /home/jwakely/src/gcc/gcc/cp/call.c:4072
0x71c5cc finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        /home/jwakely/src/gcc/gcc/cp/semantics.c:2361
0x6b9b86 complete_type(tree_node*)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:134
0x6506a5 mark_used(tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/decl2.c:4936
0x55870b build_over_call
        /home/jwakely/src/gcc/gcc/cp/call.c:7411
0x56bf2b build_op_call_1
        /home/jwakely/src/gcc/gcc/cp/call.c:4303
0x56bf2b build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
        /home/jwakely/src/gcc/gcc/cp/call.c:4326
0x71c513 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        /home/jwakely/src/gcc/gcc/cp/semantics.c:2378
0x7e4e82 c_common_parse_file()
        /home/jwakely/src/gcc/gcc/c-family/c-opts.c:1050
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to