public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103416] [12 Regression][OpenMP] Bogus firstprivate(n) map(to:n [len: 4][implicit]) Date: Thu, 25 Nov 2021 10:52:07 +0000 [thread overview] Message-ID: <bug-103416-4-NtKNmmwab6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103416-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103416 --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> --- Okay, the map(to:D.4217 [len: 4][implicit]) map(tofrom:n [len: 4][implicit]) issue is not new – only the '[implicit]' + the misaligned address one (fixed by the patch from comment 1). * * * Thus regression → comment 1 *** And extra map(to:D.4217) – this occurs already with GCC 11 and is, thus, not a regression. (Only '[implicit]' is new.) This seems to be due to a scope issue. In gimplify_omp_for (gdb) p debug(for_stmt) #pragma omp for nowait for (i0 = 1; i0 <= D.4217; i0 = i0 + 1) REALPART_EXPR <scalar> = (real(kind=8)) n; which then calls at some point omp_notice_variable ( debug_tree(decl) which ends up with 7698 nflags |= GOVD_MAP | GOVD_MAP_TO_ONLY; The problem is that here integer(kind=4) D.3933; is generated in the parent scope of '#omp target' instead of in the parent scope of '#omp parallel do'. Thus, there are two questions: * Why is 'map(to:' and not 'firstprivate' used? * Why is the var generated in the parent scope of 'omp target' instead of inside 'omp target'?
next prev parent reply other threads:[~2021-11-25 10:52 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-24 18:41 [Bug middle-end/103416] New: " burnus at gcc dot gnu.org 2021-11-24 19:05 ` [Bug middle-end/103416] " cltang at gcc dot gnu.org 2021-11-25 7:18 ` rguenth at gcc dot gnu.org 2021-11-25 10:07 ` burnus at gcc dot gnu.org 2021-11-25 10:52 ` burnus at gcc dot gnu.org [this message] 2021-11-25 11:21 ` burnus at gcc dot gnu.org 2021-11-25 11:24 ` burnus at gcc dot gnu.org 2021-12-02 11:07 ` [Bug middle-end/103416] [OpenMP] Double mapping via " burnus at gcc dot gnu.org 2022-05-06 8:32 ` [Bug fortran/103416] [OpenMP] Double mapping via firstprivate(n) map(to:n [len: 4][implicit]) of loop bounds jakub at gcc dot gnu.org 2023-05-08 12:23 ` rguenth 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-103416-4-NtKNmmwab6@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).