Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / lib-7.f90
blobfa610b16d34f767018e7cb02ebe2fdd875f5c4be
1 ! { dg-do run }
3 program main
4 implicit none
5 include "openacc_lib.h"
7 integer n
9 if (acc_get_num_devices (acc_device_nvidia) .ne. 0) then
11 call acc_init (acc_device_nvidia)
13 n = 0
15 call acc_set_device_num (n, acc_device_nvidia)
17 if (acc_get_device_num (acc_device_nvidia) .ne. 0) STOP 1
19 if (acc_get_num_devices (acc_device_nvidia) .gt. 1) then
21 n = 1
23 call acc_set_device_num (n, acc_device_nvidia)
25 if (acc_get_device_num (acc_device_nvidia) .ne. 1) STOP 2
27 end if
29 call acc_shutdown (acc_device_nvidia)
31 end if
33 if (acc_get_num_devices (acc_device_radeon) .ne. 0) then
35 call acc_init (acc_device_radeon)
37 n = 0
39 call acc_set_device_num (n, acc_device_radeon)
41 if (acc_get_device_num (acc_device_radeon) .ne. 0) STOP 1
43 if (acc_get_num_devices (acc_device_radeon) .gt. 1) then
45 n = 1
47 call acc_set_device_num (n, acc_device_radeon)
49 if (acc_get_device_num (acc_device_radeon) .ne. 1) STOP 2
51 end if
53 call acc_shutdown (acc_device_radeon)
55 end if
57 end program