]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libgomp/29949 (implement argument checking for user accessable runtime routines)
authorDaniel Franke <franke.daniel@gmail.com>
Mon, 4 Dec 2006 21:35:19 +0000 (16:35 -0500)
committerDaniel Franke <dfranke@gcc.gnu.org>
Mon, 4 Dec 2006 21:35:19 +0000 (16:35 -0500)
PR libgomp/29949
* env.c (omp_set_num_threads): Set illegal thread count to 1.

From-SVN: r119511

libgomp/ChangeLog
libgomp/env.c

index e704b2356f11a97d5ea0c2abed99b488b154ffc2..92b5600239aadcd36fc207101df2a13ff21e24da 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
+
+       PR libgomp/29949
+       * env.c (omp_set_num_threads): Set illegal thread count to 1.
+
 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * configure: Regenerate.
index af7e0c5c813e1b0597401f27df3a3b58e84abf02..f07b31b914b3e49df075cd0f3ecb83f758a4b35c 100644 (file)
@@ -225,7 +225,7 @@ initialize_env (void)
 void
 omp_set_num_threads (int n)
 {
-  gomp_nthreads_var = n;
+  gomp_nthreads_var = (n > 0 ? n : 1);
 }
 
 void