]> 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)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 28 Jun 2022 20:55:23 +0000 (13:55 -0700)
commitfa65fc45972d27f2fd79a44eaba1978348177ee9
tree4f18084b1fb8a3daca01254d71d9676d329f3233
parent27587bea74248aeaf60695d9cef6dd46068e8c9c
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.cc (c_parser_omp_requires): Check compatibility of
-foffload-memory option with requires directive.

gcc/cp/ChangeLog:

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

gcc/fortran/ChangeLog:

* openmp.cc (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.cc
gcc/cp/ChangeLog.omp
gcc/cp/parser.cc
gcc/fortran/ChangeLog.omp
gcc/fortran/openmp.cc
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]