On Fri, Jul 26, 2024 at 08:05:43PM +0200, Tobias Burnus wrote:
> --- a/libgomp/target.c
> +++ b/libgomp/target.c
> @@ -1820,8 +1820,11 @@ gomp_map_vars_internal (struct gomp_device_descr 
> *devicep,
>               if (k->aux && k->aux->link_key)
>                 {
>                   /* Set link pointer on target to the device address of the
> -                    mapped object.  */
> -                 void *tgt_addr = (void *) (tgt->tgt_start + k->tgt_offset);
> +                    mapped object. Also deal with offsets due to
> +                    array-section mapping. */

Formatting.  Two spaces after . in both spots.

> +                 void *tgt_addr = (void *) (tgt->tgt_start + k->tgt_offset
> +                                            - (k->host_start
> +                                               - 
> k->aux->link_key->host_start));

Otherwise LGTM.

        Jakub

Reply via email to