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 middle-end/99928] [OpenMP] reduction variable in combined target construct wrongly mapped as firstprivate Date: Fri, 28 May 2021 09:34:35 +0000 [thread overview] Message-ID: <bug-99928-4-NFB3MzUpC7@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99928-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99928 --- Comment #14 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:c94424b0ed786ec92b6904da69af8b5243b34fdc commit r12-1109-gc94424b0ed786ec92b6904da69af8b5243b34fdc Author: Jakub Jelinek <jakub@redhat.com> Date: Fri May 28 11:26:48 2021 +0200 openmp: Fix up handling of reduction clause on constructs combined with target [PR99928] The reduction clause should be copied as map (tofrom: ) to combined target if present, but as we need different handling of array sections between map and reduction, doing that during gimplification would be harder. So, this patch adds them during splitting, and similarly to firstprivate adds them with a new flag that they should be just ignored/removed if an explicit map clause of the same list item is present. The exact rules are to be decided in https://github.com/OpenMP/spec/issues/2766 so this patch just implements something that is IMHO reasonable and exact detailed testcases for the cornercases will follow once it is clarified. 2021-05-28 Jakub Jelinek <jakub@redhat.com> PR middle-end/99928 gcc/ * tree.h (OMP_CLAUSE_MAP_IMPLICIT): Define. gcc/c-family/ * c-omp.c (c_omp_split_clauses): For reduction clause if combined with target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT. gcc/c/ * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT. (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause if present in map_head, map_field_head or map_firstprivate_head bitmaps. gcc/cp/ * semantics.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT. (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause if present in map_head, map_field_head or map_firstprivate_head bitmaps. gcc/testsuite/ * c-c++-common/gomp/pr99928-8.c: Remove all xfails. * c-c++-common/gomp/pr99928-9.c: Likewise. * c-c++-common/gomp/pr99928-10.c: Likewise. * c-c++-common/gomp/pr99928-16.c: New test.
next prev parent reply other threads:[~2021-05-28 9:34 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-06 8:39 [Bug middle-end/99928] New: " burnus at gcc dot gnu.org 2021-04-06 9:20 ` [Bug middle-end/99928] " jakub at gcc dot gnu.org 2021-04-10 17:23 ` burnus at gcc dot gnu.org 2021-05-06 15:59 ` jakub at gcc dot gnu.org 2021-05-06 16:23 ` burnus at gcc dot gnu.org 2021-05-06 16:35 ` jakub at gcc dot gnu.org 2021-05-13 15:16 ` cvs-commit at gcc dot gnu.org 2021-05-13 19:39 ` burnus at gcc dot gnu.org 2021-05-13 20:13 ` jakub at gcc dot gnu.org 2021-05-19 7:30 ` cvs-commit at gcc dot gnu.org 2021-05-20 7:20 ` cvs-commit at gcc dot gnu.org 2021-05-21 19:15 ` cvs-commit at gcc dot gnu.org 2021-05-21 19:20 ` cvs-commit at gcc dot gnu.org 2021-05-25 9:08 ` cvs-commit at gcc dot gnu.org 2021-05-28 9:34 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-29 8:08 ` cvs-commit at gcc dot gnu.org 2021-06-01 10:48 ` cvs-commit at gcc dot gnu.org 2021-06-02 9:48 ` cvs-commit at gcc dot gnu.org 2021-06-04 10:08 ` cvs-commit at gcc dot gnu.org 2021-06-04 10:19 ` cvs-commit at gcc dot gnu.org 2021-06-04 12:04 ` burnus at gcc dot gnu.org 2021-06-08 7:52 ` cvs-commit at gcc dot gnu.org 2023-05-03 17:36 ` anlauf 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-99928-4-NFB3MzUpC7@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).