2015-08-28 17:33:40 +02:00
|
|
|
/* { dg-do run } */
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <openacc.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
void *d;
|
2017-04-10 13:32:00 +02:00
|
|
|
acc_device_t devtype = acc_device_default;
|
2015-08-28 17:33:40 +02:00
|
|
|
|
|
|
|
acc_init (devtype);
|
|
|
|
|
|
|
|
d = acc_malloc (0);
|
|
|
|
if (d != NULL)
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
acc_free (0);
|
|
|
|
|
|
|
|
acc_shutdown (devtype);
|
|
|
|
|
|
|
|
acc_set_device_type (devtype);
|
|
|
|
|
|
|
|
d = acc_malloc (0);
|
|
|
|
if (d != NULL)
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
acc_shutdown (devtype);
|
|
|
|
|
|
|
|
acc_init (devtype);
|
|
|
|
|
|
|
|
d = acc_malloc (1024);
|
|
|
|
if (d == NULL)
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
acc_free (d);
|
|
|
|
|
|
|
|
acc_shutdown (devtype);
|
|
|
|
|
|
|
|
acc_set_device_type (devtype);
|
|
|
|
|
|
|
|
d = acc_malloc (1024);
|
|
|
|
if (d == NULL)
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
acc_free (d);
|
|
|
|
|
|
|
|
acc_shutdown (devtype);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|