]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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 bcd7159ae5bdab65c14e5757dcac157c155730aa..47ba5baf439685fecbee28f277e7b5ae17fc490a 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 31f998dfc92fa2da115a891bf01e99a3b8463ba2..4813e44a23324179e01e79984896ffc829a8acf7 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 db6d8226ed02b1b45e969caec7b2fdfe613f29e2..36f2a886e47e8129bef53a35aaeb1d99ef7e1102 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 725bd5e2ebe9ac532df425b50062766d7e4bdcad..0615a445e440b82c1a9b76afadb8c4d91e7e11b9 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