aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/c/c-parser.c2
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/fortran/openmp.c3
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/requires-8.f902
4 files changed, 5 insertions, 4 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 6ada004..20774f7 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -22583,7 +22583,7 @@ c_parser_omp_requires (c_parser *parser)
c_parser_skip_to_pragma_eol (parser, false);
return;
}
- if (p)
+ if (p && this_req != OMP_REQUIRES_DYNAMIC_ALLOCATORS)
sorry_at (cloc, "%qs clause on %<requires%> directive not "
"supported yet", p);
if (p)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c06ed5e..97e9aea 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -46512,7 +46512,7 @@ cp_parser_omp_requires (cp_parser *parser, cp_token *pragma_tok)
cp_parser_skip_to_pragma_eol (parser, pragma_tok);
return false;
}
- if (p)
+ if (p && this_req != OMP_REQUIRES_DYNAMIC_ALLOCATORS)
sorry_at (cloc, "%qs clause on %<requires%> directive not "
"supported yet", p);
if (p)
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index a204323..4a03197 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -5412,7 +5412,8 @@ gfc_match_omp_requires (void)
else
goto error;
- if (requires_clause & ~OMP_REQ_ATOMIC_MEM_ORDER_MASK)
+ if (requires_clause & ~(OMP_REQ_ATOMIC_MEM_ORDER_MASK
+ | OMP_REQ_DYNAMIC_ALLOCATORS))
gfc_error_now ("Sorry, %qs clause at %L on REQUIRES directive is not "
"yet supported", clause, &old_loc);
if (!gfc_omp_requires_add_clause (requires_clause, clause, &old_loc, NULL))
diff --git a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
index 3c32ae9..eadfcaf 100644
--- a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
@@ -4,7 +4,7 @@ contains
subroutine foo
interface
subroutine bar2
- !$!omp requires dynamic_allocators
+ !$omp requires dynamic_allocators
end subroutine
end interface
!$omp target