aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2019-12-11 17:48:44 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2019-12-11 17:48:44 +0100
commit5e9394382251d43eb06f117260fcfb18961ce0c4 (patch)
tree88bc251142c911ad1856dc5e2fb3a5b2b68aef32 /libgomp
parent7c0a61870e0f8fe8ad1e21594f92ab454ca60c0d (diff)
downloadgcc-5e9394382251d43eb06f117260fcfb18961ce0c4.zip
gcc-5e9394382251d43eb06f117260fcfb18961ce0c4.tar.gz
gcc-5e9394382251d43eb06f117260fcfb18961ce0c4.tar.bz2
[OpenACC] Initialize 'dynamic_refcount' whenever we initialize 'refcount'
Cases missed in r261813 "Update OpenACC data clause semantics to the 2.5 behavior". libgomp/ * target.c (gomp_load_image_to_device, omp_target_associate_ptr): Initialize 'dynamic_refcount' whenever we initialize 'refcount'. Co-Authored-By: Julian Brown <julian@codesourcery.com> From-SVN: r279230
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog6
-rw-r--r--libgomp/target.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 6cefeba..6635ed7 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-11 Thomas Schwinge <thomas@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+
+ * target.c (gomp_load_image_to_device, omp_target_associate_ptr):
+ Initialize 'dynamic_refcount' whenever we initialize 'refcount'.
+
2019-12-11 Tobias Burnus <tobias@codesourcery.com>
* omp_lib.h.in: Fix spelling of function declaration
diff --git a/libgomp/target.c b/libgomp/target.c
index 39a24f5..1151deb 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -1334,6 +1334,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version,
k->tgt = tgt;
k->tgt_offset = target_table[i].start;
k->refcount = REFCOUNT_INFINITY;
+ k->dynamic_refcount = 0;
k->link_key = NULL;
array->left = NULL;
array->right = NULL;
@@ -1366,6 +1367,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version,
k->tgt = tgt;
k->tgt_offset = target_var->start;
k->refcount = target_size & link_bit ? REFCOUNT_LINK : REFCOUNT_INFINITY;
+ k->dynamic_refcount = 0;
k->link_key = NULL;
array->left = NULL;
array->right = NULL;
@@ -2627,6 +2629,7 @@ omp_target_associate_ptr (const void *host_ptr, const void *device_ptr,
k->tgt = tgt;
k->tgt_offset = (uintptr_t) device_ptr + device_offset;
k->refcount = REFCOUNT_INFINITY;
+ k->dynamic_refcount = 0;
array->left = NULL;
array->right = NULL;
splay_tree_insert (&devicep->mem_map, array);