From: Thomas Schwinge Date: Wed, 11 Dec 2019 16:51:31 +0000 (+0100) Subject: [OpenACC, libgomp] Initialize 'dynamic_refcount' whenever we initialize 'refcount' X-Git-Tag: releases/gcc-9.3.0~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2174a855423fdb401a89399fa22ece1ebd19c7d;p=thirdparty%2Fgcc.git [OpenACC, libgomp] 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'. Backport trunk r279230. Co-Authored-By: Julian Brown From-SVN: r279238 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 70a7f50c22ba..c1959a44b8c6 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-11 Thomas Schwinge + Julian Brown + + * target.c (gomp_load_image_to_device, omp_target_associate_ptr): + Initialize 'dynamic_refcount' whenever we initialize 'refcount'. + 2019-12-11 Tobias Burnus Backported from mainline diff --git a/libgomp/target.c b/libgomp/target.c index 31148003d0a5..97fc1ee2ddc4 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -1214,6 +1214,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; @@ -1246,6 +1247,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; @@ -2501,6 +2503,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);