Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / runtime / test / api / omp_nteams_api_env.c
blobd11c6bfb60a4fee8411555ebd24ec75898262c3e
1 // RUN: %libomp-compile && env OMP_NUM_TEAMS=5 OMP_TEAMS_THREAD_LIMIT=7 %libomp-run
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <omp.h>
7 int main(int argc, char** argv)
9 int iset, iget;
10 iset = 5;
11 iget = omp_get_max_teams();
12 if (iset != iget) {
13 fprintf(stderr, "error: nteams-var set to %d, getter returned %d\n", iset, iget);
14 exit(1);
16 iset = 7;
17 iget = omp_get_teams_thread_limit();
18 if (iset != iget) {
19 fprintf(stderr, "error: teams-thread-limit-var set to %d, getter returned %d\n", iset, iget);
20 exit(1);
22 printf("passed\n");
23 return 0;