aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgomp/env.c4
-rw-r--r--libgomp/testsuite/libgomp.c-c++-common/pr109062.c14
2 files changed, 16 insertions, 2 deletions
diff --git a/libgomp/env.c b/libgomp/env.c
index c41c1f8..e7a035b 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -124,7 +124,7 @@ int goacc_default_dims[GOMP_DIM_MAX];
#ifndef LIBGOMP_OFFLOADED_ONLY
-static int wait_policy;
+static int wait_policy = -1;
static unsigned long stacksize = GOMP_DEFAULT_STACKSIZE;
static void
@@ -1981,7 +1981,7 @@ initialize_icvs (struct gomp_initial_icvs *icvs)
icvs->bind_var = gomp_default_icv_values.bind_var;
icvs->nteams_var = gomp_default_icv_values.nteams_var;
icvs->teams_thread_limit_var = gomp_default_icv_values.teams_thread_limit_var;
- icvs->wait_policy = 0;
+ icvs->wait_policy = -1;
}
/* Helper function for initialize_env to add a device specific ICV value
diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr109062.c b/libgomp/testsuite/libgomp.c-c++-common/pr109062.c
new file mode 100644
index 0000000..5c7c287
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c-c++-common/pr109062.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+
+#include <omp.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ omp_display_env (1);
+
+ return 0;
+}
+
+/* { dg-output ".*\\\[host] GOMP_SPINCOUNT = '300000'.*" { target native } } */