gcc/libgomp/testsuite/libgomp.c/pr35625.c
Jakub Jelinek 9e7759638a 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
2008-03-18 10:54:21 +01:00

19 lines
310 B
C

/* 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;
}