On Fri, Apr 17, 2020 at 05:57:06PM +0200, Tobias Burnus wrote:
> --- a/gcc/gimplify.c
> +++ b/gcc/gimplify.c
> @@ -8785,11 +8785,15 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq 
> *pre_p,
>            'exit data' - and in particular for 'delete:' - having an 'alloc:'
>            does not make sense.  Likewise, for 'update' only transferring the
>            data itself is needed as the rest has been handled in previous
> -          directives.  */
> -       if ((code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_UPDATE)
> -           && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
> -               || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET))
> -         remove = true;
> +          directives.  However, for 'exit data', the array descriptor needs
> +          to be delete; hence, we turn the MAP_TO_PSET into a MAP_DELETE.  */
> +       if (code == OMP_TARGET_EXIT_DATA
> +           && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET)
> +         OMP_CLAUSE_SET_MAP_KIND (c, GOMP_MAP_DELETE);
> +       else if ((code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_UPDATE)
> +                && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
> +                    || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET))
> +             remove = true;

Wrong indentation of the last line, should be 1 tab + 4 spaces instead
of 2 tabs.
Otherwise LGTM, thanks.

        Jakub

Reply via email to