public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105839] internal compiler error: in tsubst_omp_for_iterator with openmp and structured bindings in a template Date: Thu, 02 Mar 2023 08:07:09 +0000 [thread overview] Message-ID: <bug-105839-4-5AoBpQVbtD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105839-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105839 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:f0ef740d54f47ff614eb02e13e8f4cb11dfbb140 commit r13-6407-gf0ef740d54f47ff614eb02e13e8f4cb11dfbb140 Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Mar 2 09:02:12 2023 +0100 openmp: Fix up error recovery for invalid structured bindings in OpenMP range for loops [PR105839] The PR108503 temporary DECL_HAS_VALUE_EXPR_P clearing code can ICE during recovery, because cp_finish_decomp when it detects errors and reports them clears DECL_HAS_VALUE_EXPR_P, clears DECL_VALUE_EXPR and sets TREE_TYPE of the structured binding vars to error_mark_node. The PR108503 code had an assertion that DECL_HAS_VALUE_EXPR_P is set so that it can clear it and restore later. The following patch allows DECL_HAS_VALUE_EXPR_P to be unset if type is error_mark_node and doesn't set it again in that case. 2023-03-02 Jakub Jelinek <jakub@redhat.com> PR c++/105839 * parser.cc (cp_convert_omp_range_for): Allow in assert decomp_first_name without DECL_HAS_VALUE_EXPR_P if it has error_mark_node type. (cp_finish_omp_range_for): Don't set DECL_HAS_VALUE_EXPR_P back on decls which have error_mark_node type. * g++.dg/gomp/pr105839-1.C: New test. * g++.dg/gomp/pr105839-2.C: New test.
prev parent reply other threads:[~2023-03-02 8:07 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-03 16:49 [Bug libgomp/105839] New: internal compiler error: in tsubst_omp_for_iterator, at cp/pt.cc:18122 (instantiate_pending_templates -> instantiate_decl -> tsubst_lambda_expr) northon_patrick3 at yahoo dot ca 2022-06-03 17:07 ` [Bug c++/105839] " jakub at gcc dot gnu.org 2023-03-01 11:10 ` [Bug c++/105839] internal compiler error: in tsubst_omp_for_iterator with openmp and structured bindings in a template jakub at gcc dot gnu.org 2023-03-01 11:47 ` jakub at gcc dot gnu.org 2023-03-01 11:52 ` northon_patrick3 at yahoo dot ca 2023-03-01 12:01 ` jakub at gcc dot gnu.org 2023-03-02 8:07 ` cvs-commit at gcc dot gnu.org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105839-4-5AoBpQVbtD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).