[Bug c++/108245] New: parser segv
rscohn2 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 28 18:08:29 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108245
Bug ID: 108245
Summary: parser segv
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rscohn2 at gmail dot com
Target Milestone: ---
Created attachment 54161
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54161&action=edit
reproducer
The attached program has a syntax error that causes a segv in the parser.
Here is the compiler version:
g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
It fails the same way with g++ 12.2 in compiler exporer:
https://godbolt.org/z/zKjYE44WW
And here is the error.
rscohn1@rscohn1-mobl1:test$ g++-12 -c short.ii
In file included from /usr/include/c++/12/type_traits:38,
from /usr/include/c++/12/bits/stl_pair.h:60,
from /usr/include/c++/12/tuple:38,
from short.cpp:1:
/usr/include/x86_64-linux-gnu/c++/12/bits/c++config.h: In function ‘auto
local_zipped_range()’:
/usr/include/x86_64-linux-gnu/c++/12/bits/c++config.h:298:36: internal compiler
error: Segmentation fault
298 | typedef __SIZE_TYPE__ size_t;
| ^~~~
0xd910e3 crash_signal
../../src/gcc/toplev.cc:322
0x7fd3ecb7451f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x81ca65 tsubst_decl
../../src/gcc/cp/pt.cc:14899
0x7e6f97 cp_parser_parameter_declaration
../../src/gcc/cp/parser.cc:24868
0x7e7512 cp_parser_parameter_declaration_list
../../src/gcc/cp/parser.cc:24564
0x7e78c4 cp_parser_parameter_declaration_clause
../../src/gcc/cp/parser.cc:24491
0x7e885f cp_parser_lambda_declarator_opt
../../src/gcc/cp/parser.cc:11579
0x7cf854 cp_parser_lambda_expression
../../src/gcc/cp/parser.cc:11105
0x7d03d3 cp_parser_primary_expression
../../src/gcc/cp/parser.cc:5698
0x7d2fed cp_parser_postfix_expression
../../src/gcc/cp/parser.cc:7654
0x7bc7c6 cp_parser_binary_expression
../../src/gcc/cp/parser.cc:10035
0x7bcfce cp_parser_assignment_expression
../../src/gcc/cp/parser.cc:10339
0x7beaf9 cp_parser_constant_expression
../../src/gcc/cp/parser.cc:10642
0x7beb91 cp_parser_initializer_clause
../../src/gcc/cp/parser.cc:25223
0x7c1b7c cp_parser_initializer
../../src/gcc/cp/parser.cc:25163
0x7ef733 cp_parser_init_declarator
../../src/gcc/cp/parser.cc:22773
0x7cbb28 cp_parser_simple_declaration
../../src/gcc/cp/parser.cc:15280
0x7cd750 cp_parser_declaration_statement
../../src/gcc/cp/parser.cc:14361
0x7cdf3c cp_parser_statement
../../src/gcc/cp/parser.cc:12446
0x7cee5d cp_parser_statement_seq_opt
../../src/gcc/cp/parser.cc:12850
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
rscohn1@rscohn1-mobl1:test$
More information about the Gcc-bugs
mailing list