https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82930
Bug ID: 82930 Summary: [C++17/AArch64] ICE: in is_normal_capture_proxy, at cp/lambda.c:288 with structured binding in a lambda function with auto typed arguments Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: p...@gcc-bugzilla.mail.kapsi.fi Target Milestone: --- Created attachment 42572 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42572&action=edit The test case that triggers `internal compiler error: in is_normal_capture_proxy, at cp/lambda.c:288' Hi. This could be related to others ICEs with structured bindings, but the thrown internal compiler error is at a different location and couldn't find anyone else having hit this particular spot. Attached a test case. Running it with (pretty much) the latest trunk (2017-11-09) currently gives: $ aarch64-none-elf-g++.exe -Wall -Wextra -c --std=gnu++17 ice_is_normal_capture_proxy.cpp ice_is_normal_capture_proxy.cpp: In lambda function: ice_is_normal_capture_proxy.cpp:17:8: internal compiler error: in is_normal_capture_proxy, at cp/lambda.c:288 eat(left); Any lambda (capturing or not) with an auto typed parameter will fail, if any of the structured binding result is used. It doesn't matter if the auto typed argument is actually used or, or whether or not the the code at lambda call site would actually compile, e.g. trying to call the lambda without any arguments. The test case compiles just fine, if the auto type is replaced with some other type, say an int (-DNO_AUTO_ARG).