[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|8.5 |9.0 Resolution|--- |FIXED --- Comment #11 from Jakub Jelinek --- The GCC 8 branch is being closed, fixed in GCC 9.1.
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.4 |8.5 --- Comment #10 from Jakub Jelinek --- GCC 8.4.0 has been released, adjusting target milestone.
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 --- Comment #9 from Jakub Jelinek --- It got fixed with r269292 in particular.
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 Jakub Jelinek changed: What|Removed |Added Priority|P1 |P4 --- Comment #3 from Jakub Jelinek --- Actually P4, error-recovery...
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 Jakub Jelinek changed: What|Removed |Added Priority|P3 |P1 CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org Target Milestone|--- |8.0
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-22 CC||dmalcolm at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from David Malcolm --- Thanks for filing this report. Confirmed. Both ICEs started with r253265. The first ICE (testcase in comment #0) happens at line 446 of lambda.c in build_capture_proxy here: 441 if (DECL_NORMAL_CAPTURE_P (member)) 442 { 443 if (DECL_VLA_CAPTURE_P (member)) 444 { 445 init = CONSTRUCTOR_ELT (init, 0)->value; 446 init = TREE_OPERAND (init, 0); // Strip ADDR_EXPR. 447 init = TREE_OPERAND (init, 0); // Strip ARRAY_REF. 448 } where "init" is error_mark. The second ICE (testcase in comment #1): Happens at line 288 of lambda.c in is_normal_capture_proxy here: 288 gcc_assert (TREE_CODE (val) == COMPONENT_REF); where val is a NOP_EXPR around a COMPONENT_REF (casting from T* to reference to T[]).
[Bug c++/84518] [8 Regression] ICE with lambda capturing broken variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84518 --- Comment #1 from Volker Reichelt --- A modified testcase produces a slightly different stack-trace: template void foo() { T x[=]; []{}; } bug.cc: In function 'void foo()': bug.cc:3:7: error: expected primary-expression before '=' token T x[=]; ^ bug.cc:3:8: error: expected primary-expression before ']' token T x[=]; ^ bug.cc: In lambda function: bug.cc:4:6: internal compiler error: in is_normal_capture_proxy, at cp/lambda.c:289 []{}; ^ 0x614602 is_normal_capture_proxy(tree_node*) ../../gcc/gcc/cp/lambda.c:289 0x8d4918 is_capture_proxy_with_ref(tree_node*) ../../gcc/gcc/cp/lambda.c:301 0x8d49ad insert_capture_proxy(tree_node*) ../../gcc/gcc/cp/lambda.c:311 0x8d546f build_capture_proxy(tree_node*, tree_node*) ../../gcc/gcc/cp/lambda.c:474 0x8d8596 start_lambda_function(tree_node*, tree_node*) ../../gcc/gcc/cp/lambda.c:1374 0x91daad cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:10662 0x91daad cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:10182 0x91daad cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:5257 0x93043c cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:7026 0x931010 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:8318 0x91139f cp_parser_cast_expression ../../gcc/gcc/cp/parser.c:9086 0x911baa cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:9187 0x9133e4 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9482 0x913af8 cp_parser_expression ../../gcc/gcc/cp/parser.c:9651 0x9157b8 cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:8 0x91bb2d cp_parser_statement ../../gcc/gcc/cp/parser.c:10922 0x91d040 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:11261 0x91d117 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:11215 0x933890 cp_parser_function_body ../../gcc/gcc/cp/parser.c:21756 0x933890 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:21793 Please submit a full bug report, [etc.]