Adjust formatting of acc_get_property tests
[gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-86.c
1 /* { dg-do run } */
2
3 #include <stdlib.h>
4 #include <unistd.h>
5 #include <openacc.h>
6
7 int
8 main (int argc, char **argv)
9 {
10 if (acc_get_num_devices (acc_device_nvidia) == 0)
11 return 0;
12
13 if (acc_get_current_cuda_device () != 0)
14 abort ();
15
16 acc_init (acc_device_host);
17
18 if (acc_get_current_cuda_device () != 0)
19 abort ();
20
21 acc_shutdown (acc_device_host);
22
23 if (acc_get_num_devices (acc_device_nvidia) == 0)
24 return 0;
25
26 if (acc_get_current_cuda_device () != 0)
27 abort ();
28
29 acc_init (acc_device_nvidia);
30
31 if (acc_get_current_cuda_device () == 0)
32 abort ();
33
34 acc_shutdown (acc_device_nvidia);
35
36 if (acc_get_current_cuda_device () != 0)
37 abort ();
38
39 return 0;
40 }
41
42 /* { dg-output "" } */