From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> gcc/ * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP>: Don't block OMP_CLAUSE_MAP_FORCE_PRESENT. gcc/testsuite/ * c-c++-common/goacc/data-clause-duplicate-1.c: Extend. * c-c++-common/goacc/present-1.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@211277 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 5 +++++ gcc/gimplify.c | 1 - gcc/testsuite/ChangeLog.gomp | 5 +++++ gcc/testsuite/c-c++-common/goacc/data-clause-duplicate-1.c | 2 ++ gcc/testsuite/c-c++-common/goacc/present-1.c | 11 +++++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/c-c++-common/goacc/present-1.c diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index 011fe77..7371aa5 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,8 @@ +2014-06-05 Thomas Schwinge <tho...@codesourcery.com> + + * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP>: + Don't block OMP_CLAUSE_MAP_FORCE_PRESENT. + 2014-06-04 Thomas Schwinge <tho...@codesourcery.com> * cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to diff --git gcc/gimplify.c gcc/gimplify.c index e98e6e5..6eaf6fd 100644 --- gcc/gimplify.c +++ gcc/gimplify.c @@ -6014,7 +6014,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, case OMP_CLAUSE_MAP: switch (OMP_CLAUSE_MAP_KIND (c)) { - case OMP_CLAUSE_MAP_FORCE_PRESENT: case OMP_CLAUSE_MAP_FORCE_DEALLOC: case OMP_CLAUSE_MAP_FORCE_DEVICEPTR: input_location = OMP_CLAUSE_LOCATION (c); diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp index 78882c0..4e0ee28 100644 --- gcc/testsuite/ChangeLog.gomp +++ gcc/testsuite/ChangeLog.gomp @@ -1,3 +1,8 @@ +2014-06-05 Thomas Schwinge <tho...@codesourcery.com> + + * c-c++-common/goacc/data-clause-duplicate-1.c: Extend. + * c-c++-common/goacc/present-1.c: New file. + 2014-03-20 Thomas Schwinge <tho...@codesourcery.com> * c-c++-common/goacc-gomp/nesting-1.c: New file. diff --git gcc/testsuite/c-c++-common/goacc/data-clause-duplicate-1.c gcc/testsuite/c-c++-common/goacc/data-clause-duplicate-1.c index 4cb3cc2..5c5ab02 100644 --- gcc/testsuite/c-c++-common/goacc/data-clause-duplicate-1.c +++ gcc/testsuite/c-c++-common/goacc/data-clause-duplicate-1.c @@ -10,4 +10,6 @@ fun (void) /* { dg-error "'fp' appears more than once in map clauses" "" { target *-*-* } 9 } */ /* { dg-message "sorry, unimplemented: data clause not yet implemented" "" { target *-*-* } 9 } */ ; +#pragma acc data create(fp) present(fp) /* { dg-error "'fp' appears more than once in map clauses" } */ + ; } diff --git gcc/testsuite/c-c++-common/goacc/present-1.c gcc/testsuite/c-c++-common/goacc/present-1.c new file mode 100644 index 0000000..03ee592 --- /dev/null +++ gcc/testsuite/c-c++-common/goacc/present-1.c @@ -0,0 +1,11 @@ +/* { dg-additional-options "-fdump-tree-original" } */ + +void +f (char *cp) +{ +#pragma acc parallel present(cp[7:9]) + ; +} + +/* { dg-final { scan-tree-dump-times "#pragma acc parallel map\\(force_present:\\*\\(cp \\+ 7\\) \\\[len: 9]\\) map\\(alloc:cp \\\[pointer assign, bias: 7]\\)" 1 "original" } } */ +/* { dg-final { cleanup-tree-dump "original" } } */ -- 1.9.1