aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-03-18 10:54:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-03-18 10:54:21 +0100
commit9e7759638ae59400bcd321db6404962c5f0ba29a (patch)
treed01dbe463d0b40bd2cac5bd2b07a86da47384d6c /libgomp/testsuite
parent483d8a4ab5b42d38d24deb698f7ac74780e953b6 (diff)
downloadgcc-9e7759638ae59400bcd321db6404962c5f0ba29a.zip
gcc-9e7759638ae59400bcd321db6404962c5f0ba29a.tar.gz
gcc-9e7759638ae59400bcd321db6404962c5f0ba29a.tar.bz2
re PR libgomp/35625 (schedule(guided) loops forever if ((end - start) % incr) != 0)
PR libgomp/35625 * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end. (gomp_iter_guided_next): Likewise. * testsuite/libgomp.c/pr35625.c: New test. From-SVN: r133306
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.c/pr35625.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/pr35625.c b/libgomp/testsuite/libgomp.c/pr35625.c
new file mode 100644
index 0000000..f2978f9
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr35625.c
@@ -0,0 +1,18 @@
+/* PR libgomp/35625 */
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+
+int
+main (void)
+{
+#pragma omp parallel
+ {
+ #pragma omp for schedule (guided, 10)
+ for (int i = 0; i < 1826; i += 10)
+ ;
+ #pragma omp for schedule (guided, 10)
+ for (int i = 0; i > -1826; i -= 10)
+ ;
+ }
+ return 0;
+}