diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-03-16 12:15:01 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2022-03-17 08:47:09 +0100 |
commit | 004fc4f2fc686d3366c9e1a2d8b9183796073866 (patch) | |
tree | d91b6df755947760a2fd4a72502896c72cd0755d /gcc | |
parent | 9fc8f278ebebc57537dc0cb9d33e36d932be0bc3 (diff) | |
download | gcc-004fc4f2fc686d3366c9e1a2d8b9183796073866.zip gcc-004fc4f2fc686d3366c9e1a2d8b9183796073866.tar.gz gcc-004fc4f2fc686d3366c9e1a2d8b9183796073866.tar.bz2 |
Enhance further testcases to verify handling of OpenACC privatization level [PR90115]
As originally introduced in commit 11b8286a83289f5b54e813f14ff56d730c3f3185
"[OpenACC privatization] Largely extend diagnostics and corresponding testsuite
coverage [PR90115]".
PR middle-end/90115
gcc/testsuite/
* c-c++-common/goacc-gomp/nesting-1.c: Enhance.
* gfortran.dg/goacc/common-block-3.f90: Likewise.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Enhance.
* testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/goacc-gomp/nesting-1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 | 13 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/testsuite/c-c++-common/goacc-gomp/nesting-1.c b/gcc/testsuite/c-c++-common/goacc-gomp/nesting-1.c index b0b7837..39b9271 100644 --- a/gcc/testsuite/c-c++-common/goacc-gomp/nesting-1.c +++ b/gcc/testsuite/c-c++-common/goacc-gomp/nesting-1.c @@ -1,14 +1,15 @@ /* { dg-additional-options "-fopt-info-omp-note" } */ -/* { dg-additional-options "--param=openacc-privatization=noisy" } for - testing/documenting aspects of that functionality. */ + +/* { dg-additional-options "--param=openacc-privatization=noisy" } + Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types): + { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */ void f_acc_data (void) { #pragma acc data - /* { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */ - /* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 } */ + /* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-1 } */ { int i; #pragma omp atomic write diff --git a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 index 5defe2e..9dbfa4c 100644 --- a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 +++ b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 @@ -1,5 +1,11 @@ ! { dg-options "-fopenacc -fdump-tree-omplower" } +! { dg-additional-options "-fopt-info-omp-all" } + +! { dg-additional-options "--param=openacc-privatization=noisy" } +! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types): +! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } + module consts integer, parameter :: n = 100 end module consts @@ -15,11 +21,14 @@ program main common /KERNELS_BLOCK/ x, y, z c = 1.0 - !$acc parallel loop copy(/BLOCK/) + !$acc parallel loop copy(/BLOCK/) ! { dg-line l1 } + ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l1 } + ! { dg-optimized {assigned OpenACC gang vector loop parallelism} {} { target *-*-* } l1 } do i = 1, n a(i) = b(i) + c end do - !$acc kernels + !$acc kernels ! { dg-line l2 } + ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l2 } do i = 1, n x(i) = y(i) + c end do |