summaryrefslogtreecommitdiff
path: root/libgomp/sections.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-02 21:19:28 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-07-02 21:19:28 +0200
commit4f9c450c2fbfd415a7e39552a3d8b170e2518b72 (patch)
tree19dc9952a79a02112a3b9cffbad788ef06cca5ea /libgomp/sections.c
parent83cc1ba13d92377f1aa863ad2136d4a18e17f9ff (diff)
downloadgcc-4f9c450c2fbfd415a7e39552a3d8b170e2518b72.tar.gz
re PR libgomp/32468 (number of threads in a parallel region depends on number of SECTIONs and MAX_THREADS)
PR libgomp/32468 * sections.c (GOMP_parallel_sections_start): Only decrease number of threads to COUNT if dyn_var is true. * testsuite/libgomp.c/pr32468.c: New test. From-SVN: r126224
Diffstat (limited to 'libgomp/sections.c')
-rw-r--r--libgomp/sections.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgomp/sections.c b/libgomp/sections.c
index de0acd843ea..9ccc65e4b66 100644
--- a/libgomp/sections.c
+++ b/libgomp/sections.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
@@ -106,7 +106,7 @@ GOMP_parallel_sections_start (void (*fn) (void *), void *data,
struct gomp_work_share *ws;
num_threads = gomp_resolve_num_threads (num_threads);
- if (num_threads > count)
+ if (gomp_dyn_var && num_threads > count)
num_threads = count;
ws = gomp_new_work_share (false, num_threads);