On Sat, 22 Sep 2018 at 00:32, Julian Brown <jul...@codesourcery.com> wrote:
>
> On Fri, 21 Sep 2018 03:14:22 +0200
> Bernhard Reutner-Fischer <rep.dot....@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 via email to