https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101731
Bug ID: 101731
Summary: ICE in cp_parser_skip_to_pragma_eol, at
cp/parser.c:4055
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Started with r7 :
$ cat z1.cc
#pragma acc routine
int f (int a());
$ g++-12-20210801 -c z1.cc -fopenacc
z1.cc:2:1: error: expected '#pragma acc' clause at end of input
2 | int f (int a());
| ^~~
z1.cc:2:1: internal compiler error: in cp_parser_skip_to_pragma_eol, at
cp/parser.c:4055
0x894a09 cp_parser_skip_to_pragma_eol
../../gcc/cp/parser.c:4055
0x8c3601 cp_parser_oacc_all_clauses
../../gcc/cp/parser.c:39055
0x8c5bfe cp_parser_late_parsing_oacc_routine
../../gcc/cp/parser.c:45202
0x8c5bfe cp_parser_late_return_type_opt
../../gcc/cp/parser.c:23580
0x8c5bfe cp_parser_direct_declarator
../../gcc/cp/parser.c:22687
0x8c5bfe cp_parser_declarator
../../gcc/cp/parser.c:22489
0x8df9b3 cp_parser_init_declarator
../../gcc/cp/parser.c:21989
0x8b84ca cp_parser_simple_declaration
../../gcc/cp/parser.c:14887
0x8e728e cp_parser_declaration
../../gcc/cp/parser.c:14592
0x8b190b cp_parser_oacc_routine
../../gcc/cp/parser.c:45163
0x8b190b cp_parser_pragma
../../gcc/cp/parser.c:45951
0x8e7eb5 cp_parser_translation_unit
../../gcc/cp/parser.c:4960
0x8e7eb5 c_parse_file()
../../gcc/cp/parser.c:46179
0xa674d2 c_common_parse_file()
../../gcc/c-family/c-opts.c:1223