]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: allow requires unified_shared_memory
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 10 Mar 2022 21:38:54 +0000 (21:38 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 11 Mar 2022 23:03:58 +0000 (23:03 +0000)
commit8126f3f00f8037b366569301ed354f0e495d8a6a
tree9af7dbbb3cd39da395e1af002ac092f290aab872
parenta17e41ca17ae8182986ac4117c93e1423ae8d37a
openmp: allow requires unified_shared_memory

This is the front-end portion of the Unified Shared Memory implementation.
It checks that -foffload-memory isn't set to an incompatible mode.

Backport of the patch posted at
https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591351.html

gcc/c/ChangeLog:

* c-parser.c (c_parser_omp_requires): Check compatibility of
-foffload-memory option with requires directive.

gcc/cp/ChangeLog:

* parser.c (cp_parser_omp_requires): Check compatibility of
-foffload-memory option with requires directive.

gcc/fortran/ChangeLog:

* openmp.c (gfc_match_omp_requires): Check compatibility of
-foffload-memory option with requires directive.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/usm-1.c: New test.
* gfortran.dg/gomp/usm-1.f90: New test.
gcc/c/ChangeLog.omp
gcc/c/c-parser.c
gcc/cp/ChangeLog.omp
gcc/cp/parser.c
gcc/fortran/ChangeLog.omp
gcc/fortran/openmp.c
gcc/testsuite/ChangeLog.omp
gcc/testsuite/c-c++-common/gomp/usm-1.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/usm-1.f90 [new file with mode: 0644]