[Bug c++/99500] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in cp_parser_requirement_parameter_list, at cp/parser.c:28828

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 10 00:09:18 GMT 2021


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

            Bug ID: 99500
           Summary: [11 Regression] ICE: tree check: expected tree that
                    contains 'decl minimal' structure, have 'error_mark'
                    in cp_parser_requirement_parameter_list, at
                    cp/parser.c:28828
           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: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.1-alpha20210307 snapshot (g:a18ebd6c439227b048a91fbfa66f5983f884c157)
ICEs when compiling the following testcase, extracted from
clang/testsuite/Parser/cxx2a-concepts-requires-expr.cpp from the clang 11.1.0
test suite, w/ -fconcepts:

bool r9 = requires (bool a, int a) { requires true; };

% g++-11.0.1 -fconcepts -c qrldoo68.cpp
qrldoo68.cpp:1:33: error: conflicting declaration 'int a'
    1 | bool r9 = requires (bool a, int a) { requires true; };
      |                             ~~~~^
qrldoo68.cpp:1:26: note: previous declaration as 'bool a'
    1 | bool r9 = requires (bool a, int a) { requires true; };
      |                     ~~~~~^
qrldoo68.cpp:1:34: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'error_mark' in
cp_parser_requirement_parameter_list, at cp/parser.c:28828
    1 | bool r9 = requires (bool a, int a) { requires true; };
      |                                  ^
0x80e5cb tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/tree.c:9988
0x68d2c8 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/tree.h:3467
0x68d2c8 cp_parser_requirement_parameter_list
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:28828
0x68d2c8 cp_parser_requires_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:28768
0x68d2c8 cp_parser_primary_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:5791
0xa4ef96 cp_parser_postfix_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:7504
0xa380d2 cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:9825
0xa38a6a cp_parser_assignment_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:10130
0xa3a8cd cp_parser_constant_expression
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:10424
0xa3a9a1 cp_parser_initializer_clause
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:24185
0xa3e39c cp_parser_initializer
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:24123
0xa6b0a3 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:21783
0xa46cc8 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:14419
0xa74605 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:14116
0xa75389 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:14145
0xa75389 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:4936
0xa75389 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/cp/parser.c:45231
0xb9dc3d c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210307/work/gcc-11-20210307/gcc/c-family/c-opts.c:1218


More information about the Gcc-bugs mailing list