1 /* { dg-do run } */ 2 3 #include <stdlib.h> 4 #include <openacc.h> 5 6 int main(int argc,char ** argv)7main (int argc, char **argv) 8 { 9 void *d; 10 acc_device_t devtype = acc_device_default; 11 12 acc_init (devtype); 13 14 d = acc_malloc (0); 15 if (d != NULL) 16 abort (); 17 18 acc_free (0); 19 20 acc_shutdown (devtype); 21 22 acc_set_device_type (devtype); 23 24 d = acc_malloc (0); 25 if (d != NULL) 26 abort (); 27 28 acc_shutdown (devtype); 29 30 acc_init (devtype); 31 32 d = acc_malloc (1024); 33 if (d == NULL) 34 abort (); 35 36 acc_free (d); 37 38 acc_shutdown (devtype); 39 40 acc_set_device_type (devtype); 41 42 d = acc_malloc (1024); 43 if (d == NULL) 44 abort (); 45 46 acc_free (d); 47 48 acc_shutdown (devtype); 49 50 return 0; 51 } 52