Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-1.c
blob5ff23b24190fed3996f6a9a581f161d5bbc37af8
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-output "device already active" } */
25 /* { dg-shouldfail "" } */