From b1c9c068f75c6763c0c6d1f1973e1b95f148feb7 Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Fri, 15 Jul 2016 07:13:48 -0700 Subject: c-parser.c (c_parser_oacc_declare): Don't scan for GOMP_MAP_POINTER. gcc/c/ * c-parser.c (c_parser_oacc_declare): Don't scan for GOMP_MAP_POINTER. * c-typeck.c (handle_omp_array_sections): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. gcc/cp/ * parser.c (cp_parser_oacc_declare): Don't scan for GOMP_MAP_POINTER. * semantics.c (handle_omp_array_sections): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. gcc/ * omp-low.c (lower_omp_target): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. libgomp/ * testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New test. From-SVN: r238376 --- gcc/omp-low.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/omp-low.c') diff --git a/gcc/omp-low.c b/gcc/omp-low.c index ecba096..04509f3 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -16210,6 +16210,10 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx) case GOMP_MAP_ALWAYS_FROM: case GOMP_MAP_ALWAYS_TOFROM: case GOMP_MAP_RELEASE: + case GOMP_MAP_FORCE_TO: + case GOMP_MAP_FORCE_FROM: + case GOMP_MAP_FORCE_TOFROM: + case GOMP_MAP_FORCE_PRESENT: tkind_zero = GOMP_MAP_ZERO_LEN_ARRAY_SECTION; break; case GOMP_MAP_DELETE: -- cgit v1.1