From 7e89420116c91647db340a4457b8ad0d60be1d5e Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 24 Jan 2023 16:59:52 -0500 Subject: [PATCH] [OpenMP] Disable tests that are not supported by GCC if it is used for testing GCC doesn't support `-fopenmp-version`, causing test failure if the compiler used for testing is GCC. GCC's OpenMP 5.2 support is very limited yet. Disable those tests requiring 5.2 feature for GCC as well. We might want to take a look at all `libomp` tests and mark those tests that don't support GCC yet. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D142173 --- openmp/runtime/test/atomic/omp-atomic-compare-signedness.c | 4 ++++ openmp/runtime/test/teams/teams-atomic.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c b/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c index de0bfed..68fd209 100644 --- a/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c +++ b/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c @@ -6,6 +6,10 @@ // RUN: %libomp-compile -fopenmp-version=51 // RUN: %libomp-run | FileCheck %s +// This test uses -fopenmp-version, which is not a compiler flag that GCC +// supports. +// UNSUPPORTED: gcc + // High parallelism increases our chances of detecting a lack of atomicity. #define NUM_THREADS_TRY 256 diff --git a/openmp/runtime/test/teams/teams-atomic.c b/openmp/runtime/test/teams/teams-atomic.c index fc96923..367355d 100644 --- a/openmp/runtime/test/teams/teams-atomic.c +++ b/openmp/runtime/test/teams/teams-atomic.c @@ -2,6 +2,8 @@ // omp teams. This is an extension to OpenMP 5.2 and is enabled by default. // RUN: %libomp-compile-and-run | FileCheck %s +// GCC has really limited OpenMP 5.2 support yet. +// UNSUPPORTED: gcc #include #include -- 2.7.4