aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/c-parser.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index 33fe7b1..4a4820d 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -15067,8 +15067,8 @@ c_parser_omp_clause_defaultmap (c_parser *parser, tree list)
if (!c_parser_next_token_is (parser, CPP_NAME))
{
invalid_category:
- c_parser_error (parser, "expected %<scalar%>, %<aggregate%> or "
- "%<pointer%>");
+ c_parser_error (parser, "expected %<scalar%>, %<aggregate%>, "
+ "%<pointer%> or %<all%>");
goto out_err;
}
p = IDENTIFIER_POINTER (c_parser_peek_token (parser)->value);
@@ -15077,6 +15077,8 @@ c_parser_omp_clause_defaultmap (c_parser *parser, tree list)
case 'a':
if (strcmp ("aggregate", p) == 0)
category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE;
+ else if (strcmp ("all", p) == 0)
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL;
else
goto invalid_category;
break;
@@ -15106,13 +15108,19 @@ c_parser_omp_clause_defaultmap (c_parser *parser, tree list)
for (c = list; c ; c = OMP_CLAUSE_CHAIN (c))
if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_DEFAULTMAP
&& (category == OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED
+ || category == OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL
|| OMP_CLAUSE_DEFAULTMAP_CATEGORY (c) == category
|| (OMP_CLAUSE_DEFAULTMAP_CATEGORY (c)
- == OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED)))
+ == OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED)
+ || (OMP_CLAUSE_DEFAULTMAP_CATEGORY (c)
+ == OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL)))
{
enum omp_clause_defaultmap_kind cat = category;
location_t loc = OMP_CLAUSE_LOCATION (c);
- if (cat == OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED)
+ if (cat == OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED
+ || (cat == OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL
+ && (OMP_CLAUSE_DEFAULTMAP_CATEGORY (c)
+ != OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED)))
cat = OMP_CLAUSE_DEFAULTMAP_CATEGORY (c);
p = NULL;
switch (cat)
@@ -15120,6 +15128,9 @@ c_parser_omp_clause_defaultmap (c_parser *parser, tree list)
case OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED:
p = NULL;
break;
+ case OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL:
+ p = "all";
+ break;
case OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE:
p = "aggregate";
break;