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; } hangs - after going through all iterations keeps calling GOMP_*_next forever, each time returning true and assigning an empty range.
Subject: Bug 35625 Author: jakub Date: Tue Mar 18 09:54:21 2008 New Revision: 133306 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133306 Log: 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. Added: trunk/libgomp/testsuite/libgomp.c/pr35625.c Modified: trunk/libgomp/ChangeLog trunk/libgomp/iter.c
Subject: Bug 35625 Author: jakub Date: Tue Mar 18 09:55:09 2008 New Revision: 133307 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133307 Log: 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. Added: branches/gcc-4_3-branch/libgomp/testsuite/libgomp.c/pr35625.c Modified: branches/gcc-4_3-branch/libgomp/ChangeLog branches/gcc-4_3-branch/libgomp/iter.c
Fixed.