From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45C883858C2B; Wed, 28 Dec 2022 18:08:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45C883858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672250910; bh=I94bcCfebr33lqbGpH80eIPN5Bjbsrmjl44gmhh3JdE=; h=From:To:Subject:Date:From; b=RaakCAZum/Tw84F1rLC8DAcgZ+CmNF5+fuXFxPwvX+JSYRGJeonxZP5PyNUAMSQ6l cMYLbLucW58GNwd0eUs6n1Qg4lwCUNcap0bMUK7RKSDdEuIChn7qhTukM6Rfe2POug fudNQRt04oVfw0jVn5uDlcqvohqpkm0ULJTc4heA= From: "rscohn2 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108245] New: parser segv Date: Wed, 28 Dec 2022 18:08:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rscohn2 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108245 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=3D54161&action=3Dedit reproducer The attached program has a syntax error that causes a segv in the parser.=20 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 =E2=80= =98auto local_zipped_range()=E2=80=99: /usr/include/x86_64-linux-gnu/c++/12/bits/c++config.h:298:36: internal comp= iler 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 for instructions. rscohn1@rscohn1-mobl1:test$=