gcc/libgomp/testsuite/libgomp.oacc-fortran/kernels-loop-2.f95
Martin Liska 2aea19bdb1 nvptx: update fix for -Wformat-diag
gcc/ChangeLog:

	* config/nvptx/nvptx.cc (nvptx_goacc_validate_dims_1): Update
	warning messages.

libgomp/ChangeLog:

	* testsuite/libgomp.oacc-c++/privatized-ref-2.C: Update scanning
	patterns.
	* testsuite/libgomp.oacc-c++/privatized-ref-3.C: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/pr85486.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/pr95270-1.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/struct-copyout-1.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/struct-copyout-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c:
	Likewise.
	* testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90:
	Likewise.
	* testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
	* testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: Likewise.

Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
2022-01-19 08:27:00 +01:00

40 lines
1 KiB
Fortran

! { dg-do run }
program main
implicit none
integer, parameter :: n = 1024
integer, dimension (0:n-1) :: a, b, c
integer :: i, ii
! Parallelism dimensions: compiler/runtime decides.
!$acc kernels copyout (a(0:n-1))
do i = 0, n - 1
a(i) = i * 2
end do
!$acc end kernels
! Parallelism dimensions: variable.
!$acc kernels copyout (b(0:n-1)) &
!$acc num_gangs (3 + a(3)) num_workers (5 + a(5)) vector_length (7 + a(7))
! { dg-prune-output "using .vector_length \\(32\\)., ignoring runtime setting" }
do i = 0, n -1
b(i) = i * 4
end do
!$acc end kernels
! Parallelism dimensions: literal.
!$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) &
!$acc num_gangs (3) num_workers (5) vector_length (7)
! { dg-prune-output "using .vector_length \\(32\\)., ignoring 7" }
do ii = 0, n - 1
c(ii) = a(ii) + b(ii)
end do
!$acc end kernels
do i = 0, n - 1
if (a(i) .ne. i * 2) STOP 1
if (b(i) .ne. i * 4) STOP 2
if (c(i) .ne. a(i) + b(i)) STOP 3
end do
end program main