[PATCH] libgomp, fortran: Apply if clause to all sub-constructs in combined OpenMP constructs

Tobias Burnus tobias@codesourcery.com
Wed Jun 24 17:29:50 GMT 2020


Hi Kwok,

the TODO is fixed by the attached patch; I would be happy if you could handle this patch,
e.g. together with your patch – or as follow up.

(Lightly tested only, i.e. it fixes the ICE but I did not
do a full testsuite run. But I regard it as obvious.)

Tobias

On 6/24/20 6:47 PM, Kwok Cheung Yeung wrote:

> +  ! TODO: This currently fails with an internal compiler error
> +  ! (PR 95869)
> +  !subroutine test_target_parallel
> +  !  do j = 1, N
> +  !    !$omp target parallel if(j .lt. LIMIT) map(tofrom: a(1:N))
> +  !    do i = 1, N
> +  !      a(i) = a(i) + 1
> +  !    end do
> +  !    !$omp end target parallel
> +  !   end do
> +  !end subroutine

At least with my build (w/o your patch but with other patches),
I see in the original dump:

           D.4049 = j <= 59;
           #pragma omp target map( ...)
             {
               {
                 logical(kind=4) D.4049;

                 #pragma omp parallel private(i) if(D.4049)
                   {
Namely, the assignment is in a different scope than the declaration of the variable.
At the moment, I do not see why this fails – at a glance, it l

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.diff
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200624/43b3ffde/attachment.bin>


More information about the Gcc-patches mailing list