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 fortran/94672] [10 Regression] gfortran/OpenMP chokes on PRESENT(array) despite of SHARED(array): Error: ‘array’ not specified in enclosing ‘parallel’
Date: Mon, 20 Apr 2020 14:54:25 +0000	[thread overview]
Message-ID: <bug-94672-4-j47uunqFlx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94672-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
>From quick look, seems the Fortran FE for the dummy optional argument uses
array.0, i.e. a local automatic array descriptor that is assigned if
if (array != 0B && (real(kind=4)[0:] * restrict) array->data != 0B)
something at the start of the function.
While most of the references to array are then replaced with accesses to
array.0,
the PRESENT check is done using the above condition.

So, I guess we should tweak the FE so that for the optional dummy arguments in
data sharing clauses it will add also firstprivate (array) or something similar
(if the original PARM_DECL is only used in PRESENT checks, then firstprivate is
all we need).

  parent reply	other threads:[~2020-04-20 14:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 14:04 [Bug fortran/94672] New: " gcc at abeckmann dot de
2020-04-20 14:34 ` [Bug fortran/94672] [10 Regression] " jakub at gcc dot gnu.org
2020-04-20 14:54 ` jakub at gcc dot gnu.org [this message]
2020-04-20 15:12 ` jakub at gcc dot gnu.org
2020-04-21 11:55 ` jakub at gcc dot gnu.org
2020-04-21 12:36 ` jakub at gcc dot gnu.org
2020-05-07 10:04 ` [Bug fortran/94672] [10/11 " tschwinge at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-05-11 14:40 ` cvs-commit at gcc dot gnu.org
2020-05-12 10:08 ` cvs-commit at gcc dot gnu.org
2020-05-12 10:09 ` burnus at gcc dot gnu.org
2020-07-22  6:58 ` jakub at gcc dot gnu.org
2020-08-26 11:06 ` trnka at scm dot com
2020-08-28 11:54 ` cvs-commit at gcc dot gnu.org
2020-08-31  6:17 ` cvs-commit at gcc dot gnu.org
2020-08-31  6:50 ` 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-94672-4-j47uunqFlx@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).