summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <abidh@codesourcery.com>2022-02-21 13:54:57 +0000
committerHafiz Abid Qadeer <abidh@codesourcery.com>2022-03-08 19:17:52 +0000
commit822a982d48b5e07b4c09dc222a521c9b63a7259c (patch)
tree998880c71764eaf0c3d46ecf88ef672a0483ab59
parent68115abc85880f7202b5e3952e8c407a0f4e0f56 (diff)
Set omp_requires_mask for dynamic_allocators.
This is backport of a patch posted in https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590655.html This patch fixes an issue that although gfortran accepts 'requires dynamic_allocators', it does not set the omp_requires_mask accordingly. gcc/fortran/ChangeLog: * parse.c (gfc_parse_file): Set OMP_REQUIRES_DYNAMIC_ALLOCATORS bit in omp_requires_mask.
-rw-r--r--gcc/fortran/ChangeLog.omp5
-rw-r--r--gcc/fortran/parse.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp
index 205c2f10237..71e5cc2c9bd 100644
--- a/gcc/fortran/ChangeLog.omp
+++ b/gcc/fortran/ChangeLog.omp
@@ -1,5 +1,10 @@
2022-03-08 Abid Qadeer <abidh@codesourcery.com>
+ * parse.c (gfc_parse_file): Set OMP_REQUIRES_DYNAMIC_ALLOCATORS
+ bit in omp_requires_mask.
+
+2022-03-08 Abid Qadeer <abidh@codesourcery.com>
+
Backported from master:
* dump-parse-tree.c (show_omp_clauses): Handle OMP_LIST_ALLOCATE.
* gfortran.h (OMP_LIST_ALLOCATE): New enum value.
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 9ee150b712d..f52a7c2103c 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -7001,6 +7001,9 @@ done:
break;
}
+ if (omp_requires & OMP_REQ_DYNAMIC_ALLOCATORS)
+ omp_requires_mask
+ = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_DYNAMIC_ALLOCATORS);
/* Do the parse tree dump. */
gfc_current_ns = flag_dump_fortran_original ? gfc_global_ns_list : NULL;