public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Julian Brown <julian@codesourcery.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Cesar Philippidis <cesar@codesourcery.com>,
		Jakub Jelinek <jakub@redhat.com>, gfortran <fortran@gcc.gnu.org>
Subject: Re: [PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC
Date: Sun, 23 Sep 2018 09:40:00 -0000	[thread overview]
Message-ID: <CAC1BbcSfTSD=ELKtXpMBfchbsdT5sQg3DQ9Vkvdfr-BbKxipMg@mail.gmail.com> (raw)
In-Reply-To: <20180921183159.2275bb0c@squid.athome>

On Sat, 22 Sep 2018 at 00:32, Julian Brown <julian@codesourcery.com> wrote:
>
> On Fri, 21 Sep 2018 03:14:22 +0200
> Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>
> > > diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
> > > index 95ea615..2ac5908 100644
> > > --- a/gcc/fortran/trans-array.c
> > > +++ b/gcc/fortran/trans-array.c
> > > @@ -88,6 +88,7 @@ along with GCC; see the file COPYING3.  If not see
> > >  #include "trans-types.h"
> > >  #include "trans-array.h"
> > >  #include "trans-const.h"
> > > +#include "trans-stmt.h"
> > >  #include "dependency.h"
> >
> > please dont mix declarations and definitions, i.e. please put
> > gfc_trans_oacc_declare_allocate() into trans-openmp.c, and add the
> > declaration to trans.h, in the corresponding /* In trans-openmp.c */
> > block there.
>
> Do you mean like this?

yes.

@@ -6218,13 +6221,20 @@ add_clause (gfc_symbol *sym, gfc_omp_map_op map_op)
 {
   gfc_omp_namelist *n;

+  if (!module_oacc_clauses)
+    module_oacc_clauses = gfc_get_omp_clauses ();
+
+  if (sym->backend_decl == NULL)
+    gfc_get_symbol_decl (sym);
+
+  for (n = module_oacc_clauses->lists[OMP_LIST_MAP]; n != NULL; n = n->next)
+    if (n->sym->backend_decl == sym->backend_decl)
+      return;
+

Didn't look too close, but should this throw an error instead of
silently returning, or was the error emitted earlier?

Furthermore the testcase uses "call abort" which is non-standard.
We recently moved to "STOP n" in the testsuite, please adjust the new
testcases accordingly.
Like (modulo typos, untested):

$ cat abort_to_stop.awk ; echo EOF
# awk -f ./abort_to_stop.awk < foo.f90 > x && mv x foo.f90
BEGIN { IGNORECASE = 1; i = 1 }
{ while (sub(/call\s\s*abort/, "stop " i)) {let i++;}; print $0; }
EOF

thanks,

  reply	other threads:[~2018-09-23  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  0:52 Julian Brown
2018-09-21  3:56 ` Bernhard Reutner-Fischer
2018-09-21 23:20   ` Julian Brown
2018-09-23  9:40     ` Bernhard Reutner-Fischer [this message]
2018-10-04 13:25       ` Julian Brown
2018-12-07 13:55         ` Jakub Jelinek
2019-06-18 23:06         ` [committed] [PR90921] Fortran OpenACC 'declare' directive's module handling causes duplicate data clauses (was: [PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC) Thomas Schwinge

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='CAC1BbcSfTSD=ELKtXpMBfchbsdT5sQg3DQ9Vkvdfr-BbKxipMg@mail.gmail.com' \
    --to=rep.dot.nop@gmail.com \
    --cc=cesar@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.com \
    /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).