]> git.ipfire.org Git - thirdparty/gcc.git/commit
Allow NULL for update directives in OpenACC 2.6
authorKwok Cheung Yeung <kcy@codesourcery.com>
Wed, 30 Jan 2019 18:43:47 +0000 (10:43 -0800)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:14:56 +0000 (12:14 +0100)
commita4d378186156b7d877bc69b87a5f2dab31fa302f
tree6c342b5c8192fe49d389c2037320a963b1942919
parent0f0f24da61ead3a3aceed8a4253845058294d29a
Allow NULL for update directives in OpenACC 2.6

A non-present passed-by-reference Fortran optional argument is represented
by a null pointer.  When passed to an update directive, it should be ignored
as variable mappings are not created for null pointers.  This should be
safe as it is not possible to change a non-present argument into a present
one (or vice-versa) in Fortran.

libgomp/
* oacc-mem.c (update_dev_host): Return early if the host address
is NULL.
        * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Remove.
        * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.

Reviewed-by: Julian Brown <julian@codesourcery.com>
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
(cherry picked from openacc-gcc-9-branch commit
b930a8a1ee826ca52081c7c0e88554b3091afb62)
libgomp/ChangeLog.omp
libgomp/oacc-mem.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-43.c [deleted file]
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-47.c [deleted file]