2019-11-27 18:50:55 +01:00
|
|
|
! Ensure that write on the offload device works.
|
2019-11-15 10:49:10 +00:00
|
|
|
|
|
|
|
! { dg-do run }
|
|
|
|
! { dg-output "The answer is 42(\n|\r\n|\r)+" }
|
2019-11-27 18:50:55 +01:00
|
|
|
|
2024-06-05 13:13:24 +02:00
|
|
|
! See 'print-1-nvptx.f90' regarding the nvptx offloading XFAIL.
|
|
|
|
! { dg-xfail-run-if TODO { openacc_nvidia_accel_selected } }
|
2019-11-15 10:49:10 +00:00
|
|
|
|
2022-04-26 18:41:23 +02:00
|
|
|
! { dg-additional-options "-fopt-info-note-omp" }
|
|
|
|
! { dg-additional-options "-foffload=-fopt-info-note-omp" }
|
|
|
|
|
|
|
|
! { dg-additional-options "--param=openacc-privatization=noisy" }
|
|
|
|
! { dg-additional-options "-foffload=--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} } */
|
|
|
|
|
|
|
|
! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
|
|
|
|
! passed to 'incr' may be unset, and in that case, it will be set to [...]",
|
|
|
|
! so to maintain compatibility with earlier Tcl releases, we manually
|
|
|
|
! initialize counter variables:
|
|
|
|
! { dg-line l_dummy[variable c_compute 0] }
|
|
|
|
! { dg-message dummy {} { target iN-VAl-Id } l_dummy } to avoid
|
|
|
|
! "WARNING: dg-line var l_dummy defined, but not used".
|
|
|
|
|
2019-11-15 10:49:10 +00:00
|
|
|
program main
|
|
|
|
implicit none
|
|
|
|
integer :: var = 42
|
|
|
|
|
2022-04-26 18:41:23 +02:00
|
|
|
!$acc parallel ! { dg-line l_compute[incr c_compute] }
|
2022-10-12 20:44:57 +00:00
|
|
|
! { dg-note {variable 'dt_parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} {} { target *-*-* } l_compute$c_compute }
|
2019-11-15 10:49:10 +00:00
|
|
|
write (0, '("The answer is ", I2)') var
|
|
|
|
!$acc end parallel
|
|
|
|
|
|
|
|
end program main
|