aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-06-26 10:19:14 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:15:30 -0300
commitd32be8f04f76e193dbdca1be6b1a5ac54994e2b3 (patch)
tree3bb76c2eaafb77e734cd8c9dbd7b48294f8688bd
parent850b2ea9511c0ae3b36b2139b8c3c18238548b27 (diff)
downloadgcc-d32be8f04f76e193dbdca1be6b1a5ac54994e2b3.zip
gcc-d32be8f04f76e193dbdca1be6b1a5ac54994e2b3.tar.gz
gcc-d32be8f04f76e193dbdca1be6b1a5ac54994e2b3.tar.bz2
Mark up unreachable OpenACC 'attach' code path
... introduced in commit 8e7e71ff247fb116dc381c5ef0c09acc0d2b374f (r279625) "OpenACC 2.6 deep copy: libgomp parts". libgomp/ * target.c (gomp_map_vars_existing): Assert 'kind != GOMP_MAP_ATTACH'. (gomp_map_vars_internal): Clean up.
-rw-r--r--libgomp/target.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgomp/target.c b/libgomp/target.c
index 3642547..d4a4a40 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -357,10 +357,12 @@ gomp_map_vars_existing (struct gomp_device_descr *devicep,
splay_tree_key newn, struct target_var_desc *tgt_var,
unsigned char kind, struct gomp_coalesce_buf *cbuf)
{
+ assert (kind != GOMP_MAP_ATTACH);
+
tgt_var->key = oldn;
tgt_var->copy_from = GOMP_MAP_COPY_FROM_P (kind);
tgt_var->always_copy_from = GOMP_MAP_ALWAYS_FROM_P (kind);
- tgt_var->do_detach = kind == GOMP_MAP_ATTACH;
+ tgt_var->do_detach = false;
tgt_var->offset = newn->host_start - oldn->host_start;
tgt_var->length = newn->host_end - newn->host_start;
@@ -815,8 +817,7 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep,
continue;
}
cur_node.host_start = (uintptr_t) hostaddrs[i];
- if (!GOMP_MAP_POINTER_P (kind & typemask)
- && (kind & typemask) != GOMP_MAP_ATTACH)
+ if (!GOMP_MAP_POINTER_P (kind & typemask))
cur_node.host_end = cur_node.host_start + sizes[i];
else
cur_node.host_end = cur_node.host_start + sizeof (void *);