summaryrefslogtreecommitdiffstats
path: root/openmp/testsuite/c/has_openmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/testsuite/c/has_openmp.c')
-rw-r--r--openmp/testsuite/c/has_openmp.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/openmp/testsuite/c/has_openmp.c b/openmp/testsuite/c/has_openmp.c
new file mode 100644
index 00000000000..983a973d867
--- /dev/null
+++ b/openmp/testsuite/c/has_openmp.c
@@ -0,0 +1,30 @@
+<ompts:test>
+<ompts:testdescription>Test which checks the OpenMp support.</ompts:testdescription>
+<ompts:ompversion>2.0</ompts:ompversion>
+<ompts:directive>_OPENMP</ompts:directive>
+<ompts:testcode>
+#include <stdio.h>
+
+#include "omp_testsuite.h"
+
+int <ompts:testcode:functionname>has_openmp</ompts:testcode:functionname>(FILE * logFile){
+ <ompts:orphan:vars>
+ int rvalue = 0;
+ </ompts:orphan:vars>
+
+ <ompts:orphan>
+ <ompts:check>
+#ifdef _OPENMP
+ rvalue = 1;
+#endif
+ </ompts:check>
+ <ompts:crosscheck>
+#if 0
+ rvalue = 1;
+#endif
+ </ompts:crosscheck>
+ </ompts:orphan>
+ return (rvalue);
+}
+</ompts:testcode>
+</ompts:test>
OpenPOWER on IntegriCloud