From 0698c9fddfc5a41dd7f233928b7a486cb044fea3 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 22 Aug 2023 17:06:50 +0200 Subject: OpenMP: Handle 'all' as category in defaultmap Both, specifying no category and specifying 'all', implies that the implicit-behavior applies to all categories. gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_clause_defaultmap): Parse 'all' as category. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_clause_defaultmap): Parse 'all' as category. gcc/fortran/ChangeLog: * gfortran.h (enum gfc_omp_defaultmap_category): Add OMP_DEFAULTMAP_CAT_ALL. * openmp.cc (gfc_match_omp_clauses): Parse 'all' as category. * trans-openmp.cc (gfc_trans_omp_clauses): Handle it. gcc/ChangeLog: * tree-core.h (enum omp_clause_defaultmap_kind): Add OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL. * gimplify.cc (gimplify_scan_omp_clauses): Handle it. * tree-pretty-print.cc (dump_omp_clause): Likewise. libgomp/ChangeLog: * libgomp.texi (OpenMP 5.2 status): Add depobj with destroy-var argument as 'N'. Mark defaultmap with 'all' category as 'Y'. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/defaultmap-1.f90: Update dg-error. * c-c++-common/gomp/defaultmap-5.c: New test. * c-c++-common/gomp/defaultmap-6.c: New test. * gfortran.dg/gomp/defaultmap-10.f90: New test. * gfortran.dg/gomp/defaultmap-9.f90: New test. --- gcc/gimplify.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/gimplify.cc') diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 7549436..9a9919e 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -12037,6 +12037,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, switch (OMP_CLAUSE_DEFAULTMAP_CATEGORY (c)) { case OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED: + case OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL: gdmkmin = GDMK_SCALAR; gdmkmax = GDMK_POINTER; break; -- cgit v1.1