Hi! On Mon, 3 Aug 2015 10:30:49 -0400, Nathan Sidwell wrote: > I've committed this patch to gomp4. The existing implementation of firstprivate > presumes the existence of memory at the CTA level. This patch does away with > that, treating firstprivate as thread-private variables initialized from the > host. > --- gcc/fortran/openmp.c (revision 226462) > +++ gcc/fortran/openmp.c (working copy) > @@ -586,22 +586,12 @@ gfc_match_omp_clauses (gfc_omp_clauses * > &c->lists[OMP_LIST_PRIVATE], true) > == MATCH_YES) > continue; > - if (mask & OMP_CLAUSE_FIRSTPRIVATE) > - { > - if (openacc) > - { > - if (gfc_match ("firstprivate ( ") == MATCH_YES > - && gfc_match_omp_map_clause (&c->lists[OMP_LIST_MAP], > - OMP_MAP_GANGLOCAL, false)) Turns out, this has been the last (only?) user of gfc_match_omp_map_clause to specify false for "allow_sections". We once had added the latter; removed on gomp-4_0-branch in r229516: commit 64fec7e145a784ec1e5844a8296e8a39aeea092d Author: tschwinge Date: Thu Oct 29 08:21:11 2015 +0000 Cleanup: gfc_match_omp_map_clause gcc/fortran/ * openmp.c (gfc_match_omp_map_clause): Remove allow_sections formal parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@229516 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog.gomp | 5 +++++ gcc/fortran/openmp.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git gcc/fortran/ChangeLog.gomp gcc/fortran/ChangeLog.gomp index 2cc161a..7fe3eac 100644 --- gcc/fortran/ChangeLog.gomp +++ gcc/fortran/ChangeLog.gomp @@ -1,3 +1,8 @@ +2015-10-29 Thomas Schwinge + + * openmp.c (gfc_match_omp_map_clause): Remove allow_sections + formal parameter. + 2015-10-28 Cesar Philippidis * trans-openmp.c (gfc_filter_oacc_combined_clauses): Don't zero- diff --git gcc/fortran/openmp.c gcc/fortran/openmp.c index afcce9a..a2c5105 100644 --- gcc/fortran/openmp.c +++ gcc/fortran/openmp.c @@ -482,12 +482,10 @@ match_oacc_clause_gang (gfc_omp_clauses *cp) mapping. */ static bool -gfc_match_omp_map_clause (gfc_omp_namelist **list, gfc_omp_map_op map_op, - bool allow_sections = true) +gfc_match_omp_map_clause (gfc_omp_namelist **list, gfc_omp_map_op map_op) { gfc_omp_namelist **head = NULL; - if (gfc_match_omp_variable_list ("", list, false, NULL, &head, - allow_sections) + if (gfc_match_omp_variable_list ("", list, false, NULL, &head, true) == MATCH_YES) { gfc_omp_namelist *n; @@ -592,7 +590,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, uint64_t mask, && gfc_match_omp_variable_list ("firstprivate (", &c->lists[OMP_LIST_FIRSTPRIVATE], true) - == MATCH_YES) + == MATCH_YES) continue; if ((mask & OMP_CLAUSE_LASTPRIVATE) && gfc_match_omp_variable_list ("lastprivate (", Grüße Thomas