blob: 17129d8bebdc256b60fe8538f969ba2a6acff3ef [file] [log] [blame]
/* { dg-do run } */
#include <openacc.h>
int
main (int argc, char **argv)
{
acc_device_t devtype = acc_device_host;
#if ACC_DEVICE_TYPE_nvidia
devtype = acc_device_nvidia;
if (acc_get_num_devices (devtype) == 0)
return 0;
#endif
acc_init (devtype);
acc_init (devtype);
return 0;
}
/* { dg-shouldfail "libgomp: device already active" } */