gcc/fortran/
PR fortran/90921
* trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
before scanning each namespace.
gcc/testsuite/
PR fortran/90921
* gfortran.dg/goacc/declare-3.f95: Update.
From-SVN: r272454
+2019-06-18 Julian Brown <julian@codesourcery.com>
+
+ PR fortran/90921
+ * trans-decl.c (finish_oacc_declare): Reset module_oacc_clauses
+ before scanning each namespace.
+
2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
PR fortran/85221
gfc_omp_clauses *omp_clauses = NULL;
gfc_omp_namelist *n, *p;
+ module_oacc_clauses = NULL;
gfc_traverse_ns (ns, find_module_oacc_declare_clauses);
if (module_oacc_clauses && sym->attr.flavor == FL_PROGRAM)
new_oc->clauses = module_oacc_clauses;
ns->oacc_declare = new_oc;
- module_oacc_clauses = NULL;
}
if (!ns->oacc_declare)
2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
+ PR fortran/90921
+ * gfortran.dg/goacc/declare-3.f95: Update.
+
PR fortran/85221
* gfortran.dg/goacc/declare-3.f95: New file.
! Test valid usage of the OpenACC 'declare' directive.
+! { dg-additional-options "-fdump-tree-original" }
+
module mod_a
implicit none
integer :: a
use mod_c
use mod_d
use mod_e
+
+ ! { dg-final { scan-tree-dump {(?n)#pragma acc data map\(force_alloc:d\) map\(force_deviceptr:c\) map\(force_to:b\) map\(force_alloc:a\)$} original } }
end program test
+
+! { dg-final { scan-tree-dump-times {#pragma acc data} 1 original } }