summaryrefslogtreecommitdiffstats
path: root/openmp/runtime
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-30 17:08:31 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-30 17:08:31 +0000
commitfc473dee98fd8d2756983b9d039cd439e5a78f24 (patch)
tree24668270a601fa1c704f3b33a4895fec4c08f3ff /openmp/runtime
parentc7832045d5e8508713cd3353ea75ff8486add49f (diff)
downloadbcm5719-llvm-fc473dee98fd8d2756983b9d039cd439e5a78f24.tar.gz
bcm5719-llvm-fc473dee98fd8d2756983b9d039cd439e5a78f24.zip
[CMake] Detect information about test compiler
Perform a nested CMake invocation to avoid writing our own parser for compiler versions when we are not testing the in-tree compiler. Use the extracted information to mark a test as unsupported that hangs with Clang prior to version 4.0.1 and restrict tests for libomptarget to Clang version 6.0.0 and later. Differential Revision: https://reviews.llvm.org/D40083 llvm-svn: 319448
Diffstat (limited to 'openmp/runtime')
-rw-r--r--openmp/runtime/test/lit.cfg4
-rw-r--r--openmp/runtime/test/lit.site.cfg.in1
-rw-r--r--openmp/runtime/test/misc_bugs/cancellation_for_sections.c4
-rw-r--r--openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp2
4 files changed, 8 insertions, 3 deletions
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index f4b017e4fc0..22969871433 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -56,8 +56,8 @@ if config.has_libatomic:
# Allow XFAIL to work
config.target_triple = [ ]
-if re.search('gcc', config.test_c_compiler) is not None:
- config.available_features.add('gcc')
+for feature in config.test_compiler_features:
+ config.available_features.add(feature)
# Setup environment to find dynamic library at runtime
append_dynamic_library_path(config.library_dir)
diff --git a/openmp/runtime/test/lit.site.cfg.in b/openmp/runtime/test/lit.site.cfg.in
index 729174ae79e..c2825ee4eab 100644
--- a/openmp/runtime/test/lit.site.cfg.in
+++ b/openmp/runtime/test/lit.site.cfg.in
@@ -2,6 +2,7 @@
config.test_c_compiler = "@OPENMP_TEST_C_COMPILER@"
config.test_cxx_compiler = "@OPENMP_TEST_CXX_COMPILER@"
+config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@
config.test_filecheck = "@OPENMP_FILECHECK_EXECUTABLE@"
config.test_openmp_flags = "@OPENMP_TEST_OPENMP_FLAGS@"
config.test_extra_flags = "@OPENMP_TEST_FLAGS@"
diff --git a/openmp/runtime/test/misc_bugs/cancellation_for_sections.c b/openmp/runtime/test/misc_bugs/cancellation_for_sections.c
index a5445d48009..07a61cb3ed0 100644
--- a/openmp/runtime/test/misc_bugs/cancellation_for_sections.c
+++ b/openmp/runtime/test/misc_bugs/cancellation_for_sections.c
@@ -1,5 +1,8 @@
// RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run
// XFAIL: gcc
+// Clang had a bug until version 4.0.1 which resulted in a hang.
+// UNSUPPORTED: clang-3, clang-4.0.0
+
// Regression test for a bug in cancellation to cover effect of `#pragma omp cancel`
// in a loop construct, on sections construct.
// Pass condition: Cancellation status from `for` does not persist
@@ -59,4 +62,3 @@ int main(void) {
printf("PASSED\n");
return 0;
}
-
diff --git a/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp b/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp
index dcaabcf6e92..63dffe44dad 100644
--- a/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp
+++ b/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp
@@ -1,5 +1,7 @@
// RUN: %libomp-cxx-compile-and-run
// RUN: %libomp-cxx-compile -DFLG=1 && %libomp-run
+// GCC-5 is needed for OpenMP 4.0 support (taskgroup)
+// XFAIL: gcc-4
#include <cstdio>
#include <cmath>
#include <cassert>
OpenPOWER on IntegriCloud