[OpenMP][Tests][NFC] Mark unsupported libomp tests for GCC

This patch properly marks the support level for libomp test when testing with
GCC.

Some new OpenMP features were only introduced with GCC 11.
Tests using the target construct are incompatibe with GCC.

Tests pass now with GCC 10, 11, 12

GitOrigin-RevId: fe7f620ed6e30015267d131bb753fd408bb3dd8c
diff --git a/runtime/test/parallel/bug54082.c b/runtime/test/parallel/bug54082.c
index 103babb..3399d1d 100644
--- a/runtime/test/parallel/bug54082.c
+++ b/runtime/test/parallel/bug54082.c
@@ -1,6 +1,10 @@
 // This test is adapted from test_parallel_for_allocate.c in SOLLVE V&V.
 // https://github.com/SOLLVE/sollve_vv/blob/master/tests/5.0/parallel_for/test_parallel_for_allocate.c
 // RUN: %libomp-compile-and-run
+
+// Support for allocate was added in GCC 11
+// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
+
 #include <omp.h>
 
 #include <assert.h>
diff --git a/runtime/test/parallel/omp_parallel_if.c b/runtime/test/parallel/omp_parallel_if.c
index 7a92402..2e28117 100644
--- a/runtime/test/parallel/omp_parallel_if.c
+++ b/runtime/test/parallel/omp_parallel_if.c
@@ -1,5 +1,9 @@
 // RUN: %libomp-compile-and-run
 // RUN: %libomp-irbuilder-compile-and-run
+
+// irbuilder is only available with clang
+// REQUIRES: clang
+
 #include <stdio.h>
 #include "omp_testsuite.h"
 
diff --git a/runtime/test/tasking/hidden_helper_task/single_helper_thread.c b/runtime/test/tasking/hidden_helper_task/single_helper_thread.c
index a1aeda7..377f394 100644
--- a/runtime/test/tasking/hidden_helper_task/single_helper_thread.c
+++ b/runtime/test/tasking/hidden_helper_task/single_helper_thread.c
@@ -1,5 +1,8 @@
 // RUN: %libomp-compile && env LIBOMP_NUM_HIDDEN_HELPER_THREADS=1 %libomp-run
 
+// gcc/icc target offloading is incompatible with libomp
+// UNSUPPORTED: icc, gcc
+
 // The test checks that "devide-by-0" bug fixed in runtime.
 // The fix is to increment number of threads by 1 if positive,
 // so that operation
diff --git a/runtime/test/teams/teams-distr-on-host.c b/runtime/test/teams/teams-distr-on-host.c
index 663d1d3..7b77d05 100644
--- a/runtime/test/teams/teams-distr-on-host.c
+++ b/runtime/test/teams/teams-distr-on-host.c
@@ -2,7 +2,9 @@
 // It checks that the bug in implementation of distribute construct is fixed.
 
 // RUN: %libomp-compile-and-run
-// UNSUPPORTED: icc
+
+// gcc/icc target offloading is incompatible with libomp
+// UNSUPPORTED: icc, gcc
 
 #include <stdio.h>
 #include <omp.h>
diff --git a/runtime/test/teams/teams_resize.c b/runtime/test/teams/teams_resize.c
index 5859969..70e9afe 100644
--- a/runtime/test/teams/teams_resize.c
+++ b/runtime/test/teams/teams_resize.c
@@ -1,5 +1,7 @@
 // RUN: %libomp-compile && env OMP_DYNAMIC=true KMP_DYNAMIC_MODE=random %libomp-run
-// UNSUPPORTED: icc
+
+// gcc/icc target offloading is incompatible with libomp
+// UNSUPPORTED: icc, gcc
 
 // This is a super simple unit test to see that teams behave properly when
 // parallel regions inside the teams construct cannot allocate teams of
diff --git a/runtime/test/worksharing/for/omp_for_collapse_non_rectangular.c b/runtime/test/worksharing/for/omp_for_collapse_non_rectangular.c
index 770e4b8..de41fda 100644
--- a/runtime/test/worksharing/for/omp_for_collapse_non_rectangular.c
+++ b/runtime/test/worksharing/for/omp_for_collapse_non_rectangular.c
@@ -1,5 +1,8 @@
 // RUN: %libomp-compile-and-run
 
+// Support for collapse of non-rectangular loop nests was added in GCC 11
+// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
+
 #include <stdio.h>
 
 #define N 3
diff --git a/runtime/test/worksharing/for/omp_for_non_rectangular.c b/runtime/test/worksharing/for/omp_for_non_rectangular.c
index 0b9451a..c7a5830 100644
--- a/runtime/test/worksharing/for/omp_for_non_rectangular.c
+++ b/runtime/test/worksharing/for/omp_for_non_rectangular.c
@@ -1,5 +1,8 @@
 // RUN: %libomp-compile-and-run
 
+// Support for collapse of non-rectangular loop nests was added in GCC 11
+// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
+
 #define N 10
 int arr[N][N][N];