summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c
new file mode 100644
index 00000000000..a23f56e753f
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-26.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+
+#include <stdlib.h>
+#include <openacc.h>
+
+int
+main (int argc, char **argv)
+{
+ const int N = 256;
+ unsigned char *h;
+ void *d;
+
+ h = (unsigned char *) malloc (N);
+
+ d = acc_create (h, 0);
+ if (!d)
+ abort ();
+
+ acc_delete (h, N);
+
+ free (h);
+
+ return 0;
+}
+
+/* { dg-shouldfail "libgomp: \[\h+,\+0\] is a bad range" } */