Shilei Tian 375862b481 [OpenMP] Fix the issue in openmp/runtime/test/parallel/bug63197.c
If the system has 32 threads, then the test will fail because of partial match.
2023-06-14 12:23:37 -04:00

21 lines
371 B
C

// RUN: %libomp-compile-and-run | FileCheck %s
#include <omp.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
#pragma omp parallel num_threads(3) if (0)
#pragma omp single
{ printf("BBB %2d\n", omp_get_num_threads()); }
#pragma omp parallel
#pragma omp single
{
if (omp_get_num_threads() != 3)
printf("PASS\n");
}
return 0;
}
// CHECK: PASS