aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-05-16 05:46:34 -0700
committerThomas Schwinge <thomas@codesourcery.com>2020-03-03 12:17:39 +0100
commit3dcd61cae159a31b2628f27b1e278aa49bfe8235 (patch)
treeb070dba775fd8c6272578cba09548b7d306c2f17 /libgomp
parenta2689f013ba29989b07cfc1ad8a310c47a0d1763 (diff)
downloadgcc-3dcd61cae159a31b2628f27b1e278aa49bfe8235.zip
gcc-3dcd61cae159a31b2628f27b1e278aa49bfe8235.tar.gz
gcc-3dcd61cae159a31b2628f27b1e278aa49bfe8235.tar.bz2
Initialise KEY and OFFSET fields when if_present test fails.
libgomp/ * target.c (gomp_map_vars_async): Initialise KEY and OFFSET fields in not-present case. (cherry picked from openacc-gcc-9-branch commit 995f9680a46c3a7246fe465faa847f8009e47ed8)
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog.omp5
-rw-r--r--libgomp/target.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 675720b..ef5579b 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,8 @@
+2019-05-16 Julian Brown <julian@codesourcery.com>
+
+ * target.c (gomp_map_vars_async): Initialise KEY and OFFSET fields in
+ not-present case.
+
2019-01-09 Julian Brown <julian@codesourcery.com>
* libgomp.texi: Update mentions of OpenACC version to 2.6. Update
diff --git a/libgomp/target.c b/libgomp/target.c
index 8e6b426..a4ed763 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -1103,8 +1103,12 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep,
if (n == NULL)
{
if (pragma_kind == GOMP_MAP_VARS_OPENACC_IF_PRESENT)
- /* No error, continue using the host address. */
- continue;
+ {
+ /* No error, continue using the host address. */
+ tgt->list[i].key = NULL;
+ tgt->list[i].offset = OFFSET_INLINED;
+ continue;
+ }
gomp_mutex_unlock (&devicep->lock);
gomp_fatal ("use_device_ptr pointer wasn't mapped");
}