Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / print-1.f90
blobd2f89d915f8901a0455ebc0122f495850f91be50
1 ! Ensure that write on the offload device works.
3 ! { dg-do run }
4 ! { dg-output "The answer is 42(\n|\r\n|\r)+" }
6 ! Separate file 'print-1-nvptx.f90' for nvptx offloading.
7 ! { dg-skip-if "separate file" { offload_target_nvptx } }
9 ! { dg-additional-options "-fopt-info-note-omp" }
10 ! { dg-additional-options "-foffload=-fopt-info-note-omp" }
12 ! { dg-additional-options "--param=openacc-privatization=noisy" }
13 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
14 ! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
15 ! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */
17 ! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
18 ! passed to 'incr' may be unset, and in that case, it will be set to [...]",
19 ! so to maintain compatibility with earlier Tcl releases, we manually
20 ! initialize counter variables:
21 ! { dg-line l_dummy[variable c_compute 0] }
22 ! { dg-message dummy {} { target iN-VAl-Id } l_dummy } to avoid
23 ! "WARNING: dg-line var l_dummy defined, but not used".
25 program main
26 implicit none
27 integer :: var = 42
29 !$acc parallel ! { dg-line l_compute[incr c_compute] }
30 ! { dg-note {variable 'dt_parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} {} { target *-*-* } l_compute$c_compute }
31 write (0, '("The answer is ", I2)') var
32 !$acc end parallel
34 end program main