Mercurial > hg > CbC > CbC_gcc
diff libgomp/testsuite/libgomp.c/static-chunk-size-one.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libgomp/testsuite/libgomp.c/static-chunk-size-one.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,23 @@ +extern void abort (); + +int +bar () +{ + int a = 0, i; + +#pragma omp parallel for num_threads (3) reduction (+:a) schedule(static, 1) + for (i = 0; i < 10; i++) + a += i; + + return a; +} + +int +main (void) +{ + int res; + res = bar (); + if (res != 45) + abort (); + return 0; +}