Adjust 'gfortran.dg/goacc/privatization-1-*' [PR103576, PR103697]
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 14 Dec 2021 06:03:52 +0000 (07:03 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 14 Dec 2021 06:17:18 +0000 (07:17 +0100)
... for the recent commit 494ebfa7c9aacaeb6ec1fccc47a0e49f31eb2bb8
"Fortran: Handle compare in OpenMP atomic", which changes the GIMPLE IR
such that a temporary is no longer used; 'original' dump:

             x = *a;
    -        {
    -          integer(kind=4) D.4237;
    -
    -          D.4237 = *a;
               #pragma omp atomic relaxed
    -            &y = D.4237;
    -        }
    +          &y = *a;
           }

(I'm not familiar to comment whether that's correct; but it appears that the
difference again disappears in later compiler passes.)

These OpenACC test cases verify behavior re OpenACC privatization levels, and
have to be adjusted accordingly.

gcc/testsuite/
PR fortran/103576
PR testsuite/103697
* gfortran.dg/goacc/privatization-1-compute-loop.f90: Adjust.
* gfortran.dg/goacc/privatization-1-compute.f90: Likewise.
* gfortran.dg/goacc/privatization-1-routine_gang-loop.f90:
Likewise.
* gfortran.dg/goacc/privatization-1-routine_gang.f90: Likewise.

gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f90
gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f90
gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f90

index bcd7159..47ba5ba 100644 (file)
@@ -50,7 +50,6 @@ contains
     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'y' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_loop$c_loop }
-    ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'y' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } l_loop$c_loop }
     !$acc end parallel
   end subroutine f
index 31f998d..4813e44 100644 (file)
@@ -43,6 +43,5 @@ contains
     ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO3" { xfail *-*-* } l_compute$c_compute }
     ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO4" { xfail *-*-* } l_compute$c_compute }
     ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute }
-    ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_compute$c_compute }
   end subroutine f
 end module m
index db6d822..36f2a88 100644 (file)
@@ -50,7 +50,6 @@ contains
     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'y' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_loop$c_loop }
-    ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
     ! { dg-note {variable 'y' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } l_loop$c_loop }
   end subroutine f
 end module m
index 725bd5e..0615a44 100644 (file)
@@ -43,5 +43,4 @@ contains
     ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
     ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
     ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
-    ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "TODO" { xfail *-*-* } l_routine$c_routine }
 end module m