| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-set-target-env-var OMP_NUM_TEAMS "42" } */ |
| 3 |
|
| 4 |
/* This test checks if omp_display_env outputs the initial ICV values although |
| 5 |
the value was updated. */ |
| 6 |
|
| 7 |
#include <omp.h> |
| 8 |
#include <stdlib.h> |
| 9 |
|
| 10 |
int |
| 11 |
main () |
| 12 |
{ |
| 13 |
omp_display_env (1); |
| 14 |
omp_set_num_teams (24); |
| 15 |
if (omp_get_max_teams () != 24) |
| 16 |
abort (); |
| 17 |
omp_display_env (1); |
| 18 |
|
| 19 |
return 0; |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-output ".*\\\[host] OMP_NUM_TEAMS = '42'.*\\\[host] OMP_NUM_TEAMS = '42'" { target native } } */ |