From: Cesar Philippidis Date: Sun, 7 Jul 2019 18:25:51 +0000 (-0700) Subject: Allow the accelerator to have more offloaded functions than the host X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57b0df6d7a56aaf9797b9ab568b0e704dd37be7e;p=thirdparty%2Fgcc.git Allow the accelerator to have more offloaded functions than the host libgomp/ * target.c (gomp_load_image_to_device): Allow the accelerator to possess more offloaded functions than the host. (cherry picked from openacc-gcc-9-branch commit 1d39156f663fa9913446dadfa5c4bb77a92aa494) --- diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 1d88bd54cd2b..00c586013363 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,8 @@ +2019-07-10 Cesar Philippidis + + * target.c (gomp_load_image_to_device): Allow the accelerator to + possess more offloaded functions than the host. + 2019-07-10 Julian Brown * oacc-parallel.c (GOACC_enter_exit_data): Fix optional arguments for diff --git a/libgomp/target.c b/libgomp/target.c index a4ed763d507c..c81e5ababb74 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -2131,7 +2131,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, = devicep->load_image_func (devicep->target_id, version, target_data, &target_table); - if (num_target_entries != num_funcs + num_vars) + if (num_target_entries < num_funcs + num_vars) { gomp_mutex_unlock (&devicep->lock); if (is_register_lock)