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

            Bug ID: 97881
           Summary: [11 Regression] ICE in warn_about_ambiguous_parse, at
                    cp/parser.c:20800
           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.0-alpha20201115 snapshot (g:c746fc40f4ec8cfc1092efd49d567751858d2099)
ICEs when compiling the following testcase, reduced from test/Sema/atomic-ops.c
from the clang 10.0.1 test suite:

void
cb ()
{
  volatile _Atomic (int) a1;
}

% g++-11.0.0 -c s10c4xmn.c
s10c4xmn.c: In function 'void a1()':
s10c4xmn.c:4:24: internal compiler error: in warn_about_ambiguous_parse, at
cp/parser.c:20800
    4 |   volatile _Atomic (int) cb;
      |                        ^
0x663c63 warn_about_ambiguous_parse
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:20800
0x9fb8b9 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:21084
0x9d9676 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:13943
0x9f654d cp_parser_declaration_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:13342
0x9db49f cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:11588
0x9dc57d cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:11954
0x9dc658 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:11904
0x9f66c4 cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:23551
0x9f66c4 cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:23602
0x9fb199 cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:29492
0x9fc529 cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:29408
0x9fc529 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:21124
0x9d9676 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:13943
0xa06564 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:13640
0xa06f19 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:4806
0xa06f19 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/cp/parser.c:44595
0xb2aa0d c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201115/work/gcc-11-20201115/gcc/c-family/c-opts.c:1196

Reply via email to