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++/108180] [OpenMP] Passing a class member variable to firstprivate() erroneously calls its dtor Date: Wed, 21 Dec 2022 08:10:12 +0000 [thread overview] Message-ID: <bug-108180-4-U9FGKTIe0U@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108180-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108180 --- Comment #2 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:1119902b6c7c1c50123ed85ec1def8be4772d68c commit r13-4822-g1119902b6c7c1c50123ed85ec1def8be4772d68c Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Dec 21 09:05:27 2022 +0100 openmp: Don't try to destruct DECL_OMP_PRIVATIZED_MEMBER vars [PR108180] DECL_OMP_PRIVATIZED_MEMBER vars are artificial vars with DECL_VALUE_EXPR of this->field used just during gimplification and omp lowering/expansion to privatize individual fields in methods when needed. As the following testcase shows, when not in templates, they were handled right, but in templates we actually called cp_finish_decl on them and that can result in their destruction, which is obviously undesirable, we should only destruct the privatized copies of them created in omp lowering. Fixed thusly. 2022-12-21 Jakub Jelinek <jakub@redhat.com> PR c++/108180 * pt.cc (tsubst_expr): Don't call cp_finish_decl on DECL_OMP_PRIVATIZED_MEMBER vars. * testsuite/libgomp.c++/pr108180.C: New test.
next prev parent reply other threads:[~2022-12-21 8:10 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-19 17:41 [Bug c++/108180] New: " info@ebner-markus.de 2022-12-20 11:56 ` [Bug c++/108180] " jakub at gcc dot gnu.org 2022-12-21 8:10 ` cvs-commit at gcc dot gnu.org [this message] 2022-12-21 8:27 ` jakub at gcc dot gnu.org 2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org 2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org 2023-05-03 9:34 ` jakub at gcc dot gnu.org 2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org 2023-05-04 7:22 ` jakub at gcc dot gnu.org
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-108180-4-U9FGKTIe0U@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).