diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90')
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90 b/libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90 new file mode 100644 index 00000000000..d3a61b57f13 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90 @@ -0,0 +1,19 @@ +! Test a combined acc parallel loop reduction. + +! { dg-do run } + +program test + implicit none + integer i, n, var + + n = 100 + var = 0 + + !$acc parallel loop reduction(+:var) + do i = 1, 100 + var = var + 1 + end do + !$acc end parallel loop + + if (var .ne. n) call abort +end program test |