[Openmp-commits] [openmp] 7e89420 - [OpenMP] Disable tests that are not supported by GCC if it is used for testing

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 24 14:00:19 PST 2023


Author: Shilei Tian
Date: 2023-01-24T17:00:15-05:00
New Revision: 7e89420116c91647db340a4457b8ad0d60be1d5e

URL: https://github.com/llvm/llvm-project/commit/7e89420116c91647db340a4457b8ad0d60be1d5e
DIFF: https://github.com/llvm/llvm-project/commit/7e89420116c91647db340a4457b8ad0d60be1d5e.diff

LOG: [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

Added: 
    

Modified: 
    openmp/runtime/test/atomic/omp-atomic-compare-signedness.c
    openmp/runtime/test/teams/teams-atomic.c

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c b/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c
index de0bfede28e5a..68fd20958ca41 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 fc9692316cefa..367355df2e839 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 <omp.h>
 #include <stdbool.h>


        


More information about the Openmp-commits mailing list