libgomp/testsuite/libgomp.fortran/pr71014.f90
raw| 1 | ! PR fortran/71014 |
| 2 | ! { dg-do run } |
| 3 | ! { dg-additional-options "-O0" } |
| 4 | |
| 5 | program pr71014 |
| 6 | implicit none |
| 7 | integer :: i, j |
| 8 | integer, parameter :: t = 100*101/2 |
| 9 | integer :: s(16) |
| 10 | s(:) = 0 |
| 11 | !$omp parallel do |
| 12 | do j = 1, 16 |
| 13 | associate (k => j) |
| 14 | do i = 1, 100 |
| 15 | s(j) = s(j) + i |
| 16 | end do |
| 17 | end associate |
| 18 | end do |
| 19 | if (any(s /= t)) stop 1 |
| 20 | end program pr71014 |