https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96458
Bug ID: 96458 Summary: [10/11 Regression] internal compiler error: in expand_expr_addr_expr_1, at expr.c:8075 for msp430-elf Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jozefl at gcc dot gnu.org Target Milestone: --- Created attachment 48993 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48993&action=edit lambda-generic-variadic20.ii g++.dg/cpp1y/lambda-generic-variadic20.C ICEs for msp430-elf on trunk and the gcc-10 branch. > ./gcc/xg++ -v > Configured with: ../configure --target=msp430-elf --enable-languages=c,c++ > ./gcc/g++ -B./gcc lambda-generic-variadic20.ii -std=c++14 -S during RTL pass: expand lambda-generic-variadic20.ii: In static member function 'static decltype (((const fooV<{const char*, int, double, char, float, short int, unsigned int}>::<lambda(auto:1 ...)>*)0)->operator()<auto:1 ...>(static_cast<auto:1&&>(fooV::._anon_2::_FUN::<unnamed>) ...)) fooV<{const char*, int, double, char, float, short int, unsigned int}>::<lambda(auto:1 ...)>::_FUN(auto:1 ...) [with auto:1 = {fooV<{const char*, int, double, char, float, short int, unsigned int}>::<lambda(auto:1 ...)>, const char*, int, double, char, float, short int, unsigned int}]': lambda-generic-variadic20.ii:2:12: internal compiler error: in expand_expr_addr_expr_1, at expr.c:8186 2 | auto L = [](auto ... a) { | ^~~~~~~~~~~~~~~~ 3 | auto M = [](decltype(a) ... b) -> void { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | }; | ~~ 5 | return M; | ~~~~~~~~~ 6 | }; | ~ 0x6a07f5 expand_expr_addr_expr_1 ../../gcc/expr.c:8186 0xc26ebd expand_expr_addr_expr ../../gcc/expr.c:8299 0xc26ebd expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:11468 0xaeb9a0 expand_normal ../../gcc/expr.h:288 0xaeb9a0 precompute_register_parameters ../../gcc/calls.c:982 0xaf48c7 expand_call(tree_node*, rtx_def*, int) ../../gcc/calls.c:4323 0xc27d76 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:11240 0xc32490 store_expr(tree_node*, rtx_def*, int, bool, bool) ../../gcc/expr.c:5852 0xc345f6 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5588 0xc345f6 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5130 0xb0a093 expand_call_stmt ../../gcc/cfgexpand.c:2701 0xb0a093 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3682 0xb0a093 expand_gimple_stmt ../../gcc/cfgexpand.c:3847 0xb0af2a expand_gimple_basic_block ../../gcc/cfgexpand.c:5888 0xb0c9f6 execute ../../gcc/cfgexpand.c:6572 Since the following commit: commit a3a4f6be0c7ac1536c4d1def14217840b04dd488 Author: Patrick Palka <ppa...@redhat.com> Date: Mon Apr 20 18:34:00 2020 -0400 c++: Recursive unification with packs and explicit targs [PR94628] Although, prior to that commit, the test didn't still didn't work: > lambda-generic-variadic20.ii: In instantiation of 'int fooV(Ts ...) [with Ts > = {const char*, int, double, char, float, short int, unsigned int}]': > lambda-generic-variadic20.ii:16:65: required from here > lambda-generic-variadic20.ii:6:14: error: expansion pattern 'decltype > ('nontype_argument_pack' not supported by dump_expr<expression error>)' > contains no parameter packs I presume the above commit fixed the behaviour in general, but underlying issues for msp430-elf mean it still doesn't work on that target.