[OpenACC] Remove 'tgt' reference counting from 'acc_unmap_data' [PR92854]

libgomp/
	PR libgomp/92854
	* oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.
This commit is contained in:
Thomas Schwinge 2020-05-29 14:12:16 +02:00
parent af8fd1a99d
commit 4662f7fe78

View file

@ -477,13 +477,13 @@ acc_unmap_data (void *h)
gomp_mutex_unlock (&acc_dev->lock);
gomp_fatal ("cannot unmap target block");
}
else if (tgt->refcount > 1)
tgt->refcount--;
else
{
free (tgt->array);
free (tgt);
}
/* Above, we've verified that the mapping must have been set up by
'acc_map_data'. */
assert (tgt->refcount == 1);
free (tgt->array);
free (tgt);
gomp_mutex_unlock (&acc_dev->lock);