https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95937
Bug ID: 95937 Summary: ICE in finish_class_member_access_expr, at cp/typeck.c:3133 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE. $cat bug.cc void a { [].decltype(auto)::b $g++ bug.cc bug.cc:1:6: error: variable or field ‘a’ declared void 1 | void a { [].decltype(auto)::b | ^ bug.cc: In lambda function: bug.cc:1:12: error: expected ‘{’ before ‘.’ token 1 | void a { [].decltype(auto)::b | ^ bug.cc: At global scope: bug.cc:1:29: internal compiler error: in finish_class_member_access_expr, at cp/typeck.c:3133 1 | void a { [].decltype(auto)::b | ^ 0x69a36f finish_class_member_access_expr(cp_expr, tree_node*, bool, int) ../../gcc/cp/typeck.c:3133 0x9b9d27 cp_parser_postfix_dot_deref_expression ../../gcc/cp/parser.c:7900 0x9b2c52 cp_parser_postfix_expression ../../gcc/cp/parser.c:7540 0x99564a cp_parser_binary_expression ../../gcc/cp/parser.c:9609 0x9971ae cp_parser_assignment_expression ../../gcc/cp/parser.c:9914 0x995f6d cp_parser_constant_expression ../../gcc/cp/parser.c:10208 0x9966d1 cp_parser_initializer_clause ../../gcc/cp/parser.c:23272 0x99683a cp_parser_initializer_list ../../gcc/cp/parser.c:23550 0x99683a cp_parser_braced_list ../../gcc/cp/parser.c:23311 0x99aa3a cp_parser_initializer ../../gcc/cp/parser.c:23228 0x9c259b cp_parser_init_declarator ../../gcc/cp/parser.c:20903 0x9a36d2 cp_parser_simple_declaration ../../gcc/cp/parser.c:13785 0x9cc926 cp_parser_declaration ../../gcc/cp/parser.c:13484 0x9cd06a cp_parser_translation_unit ../../gcc/cp/parser.c:4761 0x9cd06a c_parse_file() ../../gcc/cp/parser.c:44043 0xae4dbb c_common_parse_file() ../../gcc/c-family/c-opts.c:1190 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. $g++ --version g++ (GCC) 11.0.0 20200626 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.