From: Hafiz Abid Qadeer Date: Mon, 21 Feb 2022 13:54:57 +0000 (+0000) Subject: Set omp_requires_mask for dynamic_allocators. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=822a982d48b5e07b4c09dc222a521c9b63a7259c;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index 205c2f10237c..71e5cc2c9bda 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,8 @@ +2022-03-08 Abid Qadeer + + * parse.c (gfc_parse_file): Set OMP_REQUIRES_DYNAMIC_ALLOCATORS + bit in omp_requires_mask. + 2022-03-08 Abid Qadeer Backported from master: diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 9ee150b712d6..f52a7c2103ce 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;