[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
This commit is contained in:
Shilei Tian 2023-01-24 16:59:52 -05:00
parent def20427b4
commit 7e89420116
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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>