https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84160
Bug ID: 84160 Summary: ICE on valid C++11 code: in build_capture_proxy, at cp/lambda.c:446 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- This seems to be a recent regression. $ g++tk -v Using built-in specs. COLLECT_GCC=g++tk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 8.0.1 20180131 (experimental) [trunk revision 257233] (GCC) $ $ g++-7.2.0 -c tmp.cpp $ $ g++tk -c tmp.cpp tmp.cpp: In instantiation of ‘void f(T ...) [with T = {int}]’: tmp.cpp:8:15: required from here tmp.cpp:3:13: internal compiler error: in build_capture_proxy, at cp/lambda.c:446 [a ...] { [a ...] {}; }; ^ 0x7b01b4 build_capture_proxy(tree_node*, tree_node*) ../../gcc-source-trunk/gcc/cp/lambda.c:446 0x7b4472 start_lambda_function(tree_node*, tree_node*) ../../gcc-source-trunk/gcc/cp/lambda.c:1360 0x89c838 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-source-trunk/gcc/cp/pt.c:17018 0x861541 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-source-trunk/gcc/cp/pt.c:18312 0x8540cf tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16804 0x855e95 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16025 0x85391b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16011 0x854af8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16288 0x85391b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16011 0x854af8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16288 0x89c876 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-source-trunk/gcc/cp/pt.c:17023 0x861541 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-source-trunk/gcc/cp/pt.c:18312 0x8540cf tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16804 0x855e95 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16025 0x85391b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16011 0x854af8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/pt.c:16288 0x851cb1 instantiate_decl(tree_node*, bool, bool) ../../gcc-source-trunk/gcc/cp/pt.c:23352 0x8a2232 instantiate_pending_templates(int) ../../gcc-source-trunk/gcc/cp/pt.c:23468 0x781d62 c_parse_final_cleanups() ../../gcc-source-trunk/gcc/cp/decl2.c:4715 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ ---------------------------------------------- template < typename ... T > void f (T ... a) { [a ...] { [a ...] {}; }; } void g () { f < int > (0); }