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 fortran/94690] [OpenMP] omp ... distribute – lastprivate not permitted and more issues
Date: Wed, 22 Apr 2020 12:54:01 +0000	[thread overview]
Message-ID: <bug-94690-4-aBDVzXefZ3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94690-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94690

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #5)
> The problem is (original dump):
>   #pragma omp distribute private(d) lastprivate(d)

If one does not add the 'private(d)', it works: 'private(d)' is added by the ME
only if 'lastprivate(d)' is not present.

Namely, the following patch works – but the question is, whence to add a
clause. (There is more such code.)

--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -4312,7 +4312,5 @@ gfc_trans_omp_do (gfc_code *code, gfc_exec_op op,
stmtblock_t *pblock,
                dovar_found = 2;
-           }
-         else
-           tmp = build_omp_clause (input_location, OMP_CLAUSE_PRIVATE);
          OMP_CLAUSE_DECL (tmp) = dovar_decl;
          omp_clauses = gfc_trans_add_clause (tmp, omp_clauses);
+           }
        }

  parent reply	other threads:[~2020-04-22 12:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 13:43 [Bug fortran/94690] New: " burnus at gcc dot gnu.org
2020-04-21 13:48 ` [Bug fortran/94690] " burnus at gcc dot gnu.org
2020-04-21 14:56 ` burnus at gcc dot gnu.org
2020-04-21 15:53 ` burnus at gcc dot gnu.org
2020-04-22  7:33 ` burnus at gcc dot gnu.org
2020-04-22 12:43 ` burnus at gcc dot gnu.org
2020-04-22 12:54 ` burnus at gcc dot gnu.org [this message]
2020-04-22 13:23 ` burnus at gcc dot gnu.org
2020-04-23  8:52 ` burnus at gcc dot gnu.org
2020-05-13  8:07 ` cvs-commit at gcc dot gnu.org
2020-05-13 16:58 ` burnus at gcc dot gnu.org
2020-05-15 14:42 ` cvs-commit at gcc dot gnu.org
2020-05-17 18:39 ` schwab@linux-m68k.org
2020-05-17 18:49 ` burnus at gcc dot gnu.org
2020-09-09  7:34 ` cvs-commit at gcc dot gnu.org
2020-09-09  9:55 ` cvs-commit at gcc dot gnu.org
2020-09-09 11:27 ` burnus 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-94690-4-aBDVzXefZ3@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: link
Be 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).