Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-2.c
blobb16e9e6bdbceef0862152b3e60023f409d0434a0
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 (acc_device_nvidia) == 0)
14 return 0;
15 #endif
17 acc_init (devtype);
19 acc_shutdown (devtype);
21 acc_shutdown (devtype);
23 return 0;
26 /* { dg-output "no device initialized" } */
27 /* { dg-shouldfail "" } */