public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/93931] ICE using lambda capture in openMP parallel for reduction Date: Wed, 18 Mar 2020 18:51:23 +0000 [thread overview] Message-ID: <bug-93931-4-9ElfdeLlB3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93931-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93931 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think we need also: --- gcc/cp/cp-gimplify.c.jj 2020-03-11 09:28:53.964213973 +0100 +++ gcc/cp/cp-gimplify.c 2020-03-18 19:09:53.281323970 +0100 @@ -2260,12 +2260,17 @@ cxx_omp_finish_clause (tree c, gimple_se bool cxx_omp_disregard_value_expr (tree decl, bool shared) { - return !shared - && VAR_P (decl) - && DECL_HAS_VALUE_EXPR_P (decl) - && DECL_ARTIFICIAL (decl) - && DECL_LANG_SPECIFIC (decl) - && DECL_OMP_PRIVATIZED_MEMBER (decl); + if (shared) + return false; + if (VAR_P (decl) + && DECL_HAS_VALUE_EXPR_P (decl) + && DECL_ARTIFICIAL (decl) + && DECL_LANG_SPECIFIC (decl) + && DECL_OMP_PRIVATIZED_MEMBER (decl)) + return true; + if (is_capture_proxy (decl)) + return true; + return false; } /* Fold expression X which is used as an rvalue if RVAL is true. */ but will need as well proper testsuite coverage for using OpenMP constructs in lambdas; in OpenMP 4.5 and earlier that wasn't well defined, but in OpenMP 5.0 which we (partially) support now it is.
next prev parent reply other threads:[~2020-03-18 18:51 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93931-4@http.gcc.gnu.org/bugzilla/> 2020-03-18 17:56 ` jakub at gcc dot gnu.org 2020-03-18 18:51 ` jakub at gcc dot gnu.org [this message] 2020-03-19 11:28 ` cvs-commit at gcc dot gnu.org 2020-03-19 12:05 ` jakub at gcc dot gnu.org 2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org 2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org 2020-09-17 17:15 ` jakub at gcc dot gnu.org 2021-10-01 7:13 ` pinskia at gcc dot gnu.org 2021-10-01 7:14 ` pinskia 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-93931-4-9ElfdeLlB3@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).