]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Set omp_requires_mask for dynamic_allocators.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Mon, 21 Feb 2022 13:54:57 +0000 (13:54 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 28 Jun 2022 20:55:21 +0000 (13:55 -0700)
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.cc (gfc_parse_file): Set OMP_REQUIRES_DYNAMIC_ALLOCATORS
bit in omp_requires_mask.

gcc/fortran/ChangeLog.omp
gcc/fortran/parse.cc

index bbe23e93e1d208f96fc0b79fd2f61067fdfbd483..a9815696d21e93a765924dd9a0dd7a8667ea11a1 100644 (file)
@@ -1,3 +1,8 @@
+2022-03-08  Abid Qadeer  <abidh@codesourcery.com>
+
+       * parse.cc (gfc_parse_file): Set OMP_REQUIRES_DYNAMIC_ALLOCATORS
+       bit in omp_requires_mask.
+
 2022-03-01  Tobias Burnus  <tobias@codesourcery.com>
 
        * class.cc (finalization_scalarizer): Mark syms as artificial.
index 1d216247bc3d8762c7e0cb8109f75d231664b909..14c31d53b2734c7dac01ec415b50cff8cd0f7d36 100644 (file)
@@ -7022,6 +7022,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;