LLVM OpenMP
omp_denylist_extra_coverage.c
Go to the documentation of this file.
1// RUN: %libomp-compile
2// RUN: env KMP_WARNINGS=1 OMP_TARGET_OFFLOAD_DEV_0=mandatory \
3// RUN: OMP_TOOL_LIBRARIES_ALL=libfoo.so \
4// RUN: OMP_CANCELLATION_DEV=true \
5// RUN: OMP_NUM_THREADS_ALL=8 \
6// RUN: %libomp-run 2>&1 | FileCheck %s
7//
8// Denylist: suffixed global OMP_* warns; OMP_NUM_THREADS_ALL still applies.
9
10#include <omp.h>
11#include <stdio.h>
12
13int main(void) {
14 int max = omp_get_max_threads();
15 if (max != 8) {
16 fprintf(stderr, "FAIL: omp_get_max_threads()=%d, expected 8\n", max);
17 return 1;
18 }
19 printf("DONE\n");
20 return 0;
21}
22
23// CHECK-DAG: {{^OMP: Warning #[0-9]+:.*OMP_TARGET_OFFLOAD_DEV_0.*}}
24// CHECK-DAG: {{^OMP: Warning #[0-9]+:.*OMP_TOOL_LIBRARIES_ALL.*}}
25// CHECK-DAG: {{^OMP: Warning #[0-9]+:.*OMP_CANCELLATION_DEV.*}}
26// CHECK: DONE
int main(void)
int omp_get_max_threads()