OpenACC documentation updates.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c / lib-1.c
blob17129d8bebdc256b60fe8538f969ba2a6acff3ef
1 /* { dg-do run } */
3 #include <openacc.h>
5 int
6 main (int argc, char **argv)
8 acc_device_t devtype = acc_device_host;
10 #if ACC_DEVICE_TYPE_nvidia
11 devtype = acc_device_nvidia;
13 if (acc_get_num_devices (devtype) == 0)
14 return 0;
15 #endif
17 acc_init (devtype);
19 acc_init (devtype);
21 return 0;
24 /* { dg-shouldfail "libgomp: device already active" } */