This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/84420] [8 Regression] ICE when accessing a structured binding in a lambda


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

--- Comment #1 from Benjamin Buch <benni.buch at gmail dot com> ---
Same with:

int main(){
    []{
        int a[1]{};
        auto [v] = a;
        (void)v;
    }();
}


$ g++ -std=c++17 main.cpp                                                       
main.cpp: In lambda function:
main.cpp:5:15: internal compiler error: in is_normal_capture_proxy, at
cp/lambda.c:288
         (void)v;
               ^
0x5e3bf6 is_normal_capture_proxy(tree_node*)                                    
        ../../gcc/gcc/cp/lambda.c:288                                           
0x8a5578 is_lambda_ignored_entity(tree_node*)                                   
        ../../gcc/gcc/cp/lambda.c:1291                                          
0x8c16ef qualify_lookup                                                         
        ../../gcc/gcc/cp/name-lookup.c:5322                                     
0x8cc483 lookup_name_real_1                                                     
        ../../gcc/gcc/cp/name-lookup.c:6015                                     
0x8cc483 lookup_name_real(tree_node*, int, int, bool, int, int)                 
        ../../gcc/gcc/cp/name-lookup.c:6104                                     
0x8d450b cp_parser_lookup_name                                                  
        ../../gcc/gcc/cp/parser.c:26103                                         
0x8ee22a cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:22326
0x8ee4e1 cp_parser_type_name
        ../../gcc/gcc/cp/parser.c:17318
0x8fc55b cp_parser_type_name
        ../../gcc/gcc/cp/parser.c:17306
0x8fc55b cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:17178
0x8fd647 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:6945
0x8fe2b0 cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:8318
0x8de69f cp_parser_cast_expression
        ../../gcc/gcc/cp/parser.c:9086
0x8de861 cp_parser_cast_expression
        ../../gcc/gcc/cp/parser.c:9038
0x8deeaa cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:9187
0x8e0684 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:9476
0x8e0d98 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:9645
0x8e2a58 cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:11112
0x8e8dcd cp_parser_statement
        ../../gcc/gcc/cp/parser.c:10916
0x8ea2e0 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:11255
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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]