aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.cc')
-rw-r--r--gcc/cp/parser.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index c5d1f9d..212ed14 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -44445,6 +44445,14 @@ cp_parser_omp_target_enter_data (cp_parser *parser, cp_token *pragma_tok,
case GOMP_MAP_ALLOC:
map_seen = 3;
break;
+ case GOMP_MAP_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_TO);
+ map_seen = 3;
+ break;
+ case GOMP_MAP_ALWAYS_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_TO);
+ map_seen = 3;
+ break;
case GOMP_MAP_FIRSTPRIVATE_POINTER:
case GOMP_MAP_FIRSTPRIVATE_REFERENCE:
case GOMP_MAP_ALWAYS_POINTER:
@@ -44454,7 +44462,7 @@ cp_parser_omp_target_enter_data (cp_parser *parser, cp_token *pragma_tok,
map_seen |= 1;
error_at (OMP_CLAUSE_LOCATION (*pc),
"%<#pragma omp target enter data%> with map-type other "
- "than %<to%> or %<alloc%> on %<map%> clause");
+ "than %<to%>, %<tofrom%> or %<alloc%> on %<map%> clause");
*pc = OMP_CLAUSE_CHAIN (*pc);
continue;
}
@@ -44537,6 +44545,14 @@ cp_parser_omp_target_exit_data (cp_parser *parser, cp_token *pragma_tok,
case GOMP_MAP_DELETE:
map_seen = 3;
break;
+ case GOMP_MAP_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_FROM);
+ map_seen = 3;
+ break;
+ case GOMP_MAP_ALWAYS_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_FROM);
+ map_seen = 3;
+ break;
case GOMP_MAP_FIRSTPRIVATE_POINTER:
case GOMP_MAP_FIRSTPRIVATE_REFERENCE:
case GOMP_MAP_ALWAYS_POINTER:
@@ -44546,8 +44562,8 @@ cp_parser_omp_target_exit_data (cp_parser *parser, cp_token *pragma_tok,
map_seen |= 1;
error_at (OMP_CLAUSE_LOCATION (*pc),
"%<#pragma omp target exit data%> with map-type other "
- "than %<from%>, %<release%> or %<delete%> on %<map%>"
- " clause");
+ "than %<from%>, %<tofrom%>, %<release%> or %<delete%> "
+ "on %<map%> clause");
*pc = OMP_CLAUSE_CHAIN (*pc);
continue;
}