2 ! { dg-additional-options "-cpp" }
8 integer, parameter :: N
= 8
9 integer, parameter :: one
= 1
10 integer, parameter :: zero
= 0
12 real, allocatable
:: a(:), b(:)
22 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (1 == 1)
24 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
39 if (b(i
) .ne
. exp
) STOP 1
44 !$acc parallel if (0 == 1)
46 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
55 if (b(i
) .ne
. 17.0) STOP 2
60 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (one == 1)
62 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
77 if (b(i
) .ne
. exp
) STOP 3
82 !$acc parallel if (zero == 1)
84 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
93 if (b(i
) .ne
. 23.0) STOP 4
98 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (.TRUE.)
100 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
115 if (b(i
) .ne
. exp
) STOP 5
120 !$acc parallel if (.FALSE.)
122 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
131 if (b(i
) .ne
. 77.0) STOP 6
138 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (nn == 1)
140 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
155 if (b(i
) .ne
. exp
) STOP 7
162 !$acc parallel if (nn == 1)
164 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
173 if (b(i
) .ne
. 19.0) STOP 8
180 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if ((nn + nn) > 0)
182 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
197 if (b(i
) .ne
. exp
) STOP 9
204 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if ((nn + nn) > 0)
206 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
215 if (b(i
) .ne
. 39.0) STOP 10
220 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (-2 > 0)
222 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
231 if (b(i
) .ne
. 92.0) STOP 11
236 !$acc parallel copyin (a(1:N)) copyout (b(1:N)) if (one == 1)
238 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
253 if (b(i
) .ne
. exp
) STOP 12
258 !$acc parallel if (one == 0)
260 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
269 if (b(i
) .ne
. 88.0) STOP 13
279 call acc_copyin (a
, sizeof (a
))
280 call acc_copyin (b
, sizeof (b
))
285 !$acc update device (a(1:N), b(1:N)) if (1 == 1)
290 !$acc update host (a(1:N), b(1:N)) if (1 == 1)
293 if (a(i
) .ne
. exp
) STOP 14
294 if (b(i
) .ne
. exp2
) STOP 15
300 !$acc update device (a(1:N), b(1:N)) if (0 == 1)
305 !$acc update host (a(1:N), b(1:N)) if (1 == 1)
308 if (a(i
) .ne
. exp
) STOP 16
309 if (b(i
) .ne
. exp2
) STOP 17
315 !$acc update device (a(1:N), b(1:N)) if (1 == 1)
320 !$acc update host (a(1:N), b(1:N)) if (0 == 1)
323 if (a(i
) .ne
. 0.0) STOP 18
324 if (b(i
) .ne
. 0.0) STOP 19
328 call acc_copyout (a
, sizeof (a
))
329 call acc_copyout (b
, sizeof (b
))
335 !$acc data copyin (a(1:N)) copyout (b(1:N)) if (1 == 1)
337 !$acc parallel present (a(1:N))
345 if (b(i
) .ne
. 4.0) STOP 20
351 !$acc data copyin (a(1:N)) copyout (b(1:N)) if (0 == 1)
354 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 21
355 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 22
363 !$acc data copyin (a(1:N)) if (1 == 1)
366 if (acc_is_present (a
) .eqv
. .FALSE
.) STOP 23
369 !$acc data copyout (b(1:N)) if (0 == 1)
371 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 24
373 !$acc data copyout (b(1:N)) if (1 == 1)
375 !$acc parallel present (a(1:N)) present (b(1:N))
384 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 25
390 if (b(1) .ne
. 18.0) STOP 26
393 !$acc enter data copyin (b(1:N)) if (0 == 1)
396 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 27
399 !$acc exit data delete (b(1:N)) if (0 == 1)
401 !$acc enter data copyin (b(1:N)) if (1 == 1)
404 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 28
407 !$acc exit data delete (b(1:N)) if (1 == 1)
410 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 29
413 !$acc enter data copyin (b(1:N)) if (zero == 1)
416 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 30
419 !$acc exit data delete (b(1:N)) if (zero == 1)
421 !$acc enter data copyin (b(1:N)) if (one == 1)
424 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 31
427 !$acc exit data delete (b(1:N)) if (one == 1)
430 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 32
433 !$acc enter data copyin (b(1:N)) if (one == 0)
436 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 33
439 !$acc exit data delete (b(1:N)) if (one == 0)
441 !$acc enter data copyin (b(1:N)) if (one == 1)
444 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 34
447 !$acc exit data delete (b(1:N)) if (one == 1)
450 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 35
455 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (1 == 1)
457 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
472 if (b(i
) .ne
. exp
) STOP 36
477 !$acc kernels if (0 == 1)
479 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
488 if (b(i
) .ne
. 17.0) STOP 37
493 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (one == 1)
495 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
510 if (b(i
) .ne
. exp
) STOP 38
515 !$acc kernels if (zero == 1)
517 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
526 if (b(i
) .ne
. 23.0) STOP 39
531 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (.TRUE.)
533 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
548 if (b(i
) .ne
. exp
) STOP 40
553 !$acc kernels if (.FALSE.)
555 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
564 if (b(i
) .ne
. 77.0) STOP 41
571 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (nn == 1)
573 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
588 if (b(i
) .ne
. exp
) STOP 42
595 !$acc kernels if (nn == 1)
597 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
606 if (b(i
) .ne
. 19.0) STOP 43
613 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if ((nn + nn) > 0)
615 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
630 if (b(i
) .ne
. exp
) STOP 44
637 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if ((nn + nn) > 0)
639 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
648 if (b(i
) .ne
. 39.0) STOP 45
653 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (-2 > 0)
655 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
664 if (b(i
) .ne
. 92.0) STOP 46
669 !$acc kernels copyin (a(1:N)) copyout (b(1:N)) if (one == 1)
671 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
686 if (b(i
) .ne
. exp
) STOP 47
691 !$acc kernels if (one == 0)
693 if (acc_on_device (acc_device_host
) .eqv
. .TRUE
.) then
702 if (b(i
) .ne
. 88.0) STOP 48
712 call acc_copyin (a
, sizeof (a
))
713 call acc_copyin (b
, sizeof (b
))
718 !$acc update device (a(1:N), b(1:N)) if (1 == 1)
723 !$acc update host (a(1:N), b(1:N)) if (1 == 1)
726 if (a(i
) .ne
. exp
) STOP 49
727 if (b(i
) .ne
. exp2
) STOP 50
733 !$acc update device (a(1:N), b(1:N)) if (0 == 1)
738 !$acc update host (a(1:N), b(1:N)) if (1 == 1)
741 if (a(i
) .ne
. exp
) STOP 51
742 if (b(i
) .ne
. exp2
) STOP 52
748 !$acc update device (a(1:N), b(1:N)) if (1 == 1)
753 !$acc update host (a(1:N), b(1:N)) if (0 == 1)
756 if (a(i
) .ne
. 0.0) STOP 53
757 if (b(i
) .ne
. 0.0) STOP 54
761 call acc_copyout (a
, sizeof (a
))
762 call acc_copyout (b
, sizeof (b
))
768 !$acc data copyin (a(1:N)) copyout (b(1:N)) if (1 == 1)
770 !$acc kernels present (a(1:N))
778 if (b(i
) .ne
. 4.0) STOP 55
784 !$acc data copyin (a(1:N)) copyout (b(1:N)) if (0 == 1)
787 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 56
788 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 57
796 !$acc data copyin (a(1:N)) if (1 == 1)
799 if (acc_is_present (a
) .eqv
. .FALSE
.) STOP 58
802 !$acc data copyout (b(1:N)) if (0 == 1)
804 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 59
806 !$acc data copyout (b(1:N)) if (1 == 1)
808 !$acc kernels present (a(1:N)) present (b(1:N))
817 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 60
823 if (b(1) .ne
. 18.0) STOP 61
826 !$acc enter data copyin (b(1:N)) if (0 == 1)
829 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 62
832 !$acc exit data delete (b(1:N)) if (0 == 1)
834 !$acc enter data copyin (b(1:N)) if (1 == 1)
837 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 63
840 !$acc exit data delete (b(1:N)) if (1 == 1)
843 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 64
846 !$acc enter data copyin (b(1:N)) if (zero == 1)
849 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 65
852 !$acc exit data delete (b(1:N)) if (zero == 1)
854 !$acc enter data copyin (b(1:N)) if (one == 1)
857 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 66
860 !$acc exit data delete (b(1:N)) if (one == 1)
863 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 67
866 !$acc enter data copyin (b(1:N)) if (one == 0)
869 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 68
872 !$acc exit data delete (b(1:N)) if (one == 0)
874 !$acc enter data copyin (b(1:N)) if (one == 1)
877 if (acc_is_present (b
) .eqv
. .FALSE
.) STOP 69
880 !$acc exit data delete (b(1:N)) if (one == 1)
883 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 70