coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / pr45597.f90
blob6d6a65d446742114e5f59b13009948f9dc95a1cc
1 ! PR fortran/45597
2 ! { dg-do compile }
3 ! { dg-options "-fopenmp" }
5 subroutine foo(n)
6 integer :: i, n(6)
7 !$omp parallel do default(none) shared(n)
8 do i = 1, 6
9 if (n(i).gt.0) cycle
10 end do
11 end subroutine
12 subroutine bar(n)
13 integer :: i, j, k, n(6, 6, 6)
14 !$omp parallel do default(none) shared(n) collapse(3)
15 do i = 1, 6
16 do j = 1, 6
17 do k = 1, 6
18 if (n(i, j, k).gt.0) cycle
19 end do
20 end do
21 end do
22 end subroutine