Debian Codegraph @

gcc/testsuite/gfortran.dg/pr119836_3.f90

raw
1 !
2 ! { dg-do run }
3 !
4 ! PR fortran/119836
5 !
6 program p
7 implicit none
8 integer, parameter :: n = 4
9 integer :: i
10 integer :: y(n), x(n)
11 x = [(i,i=1,n)]
12 do concurrent (i=1:n)
13 call bar(x, y)
14 end do
15 if (any(x /= y)) stop 1
16 x = 2 * x
17 do concurrent (i=1:n)
18 block
19 call bar(x, y)
20 end block
21 end do
22 if (any(x /= y)) stop 1
23
24 contains
25 elemental subroutine bar(x, y)
26 integer, intent(in) :: x
27 integer, intent(out) :: y
28 y = x
29 end subroutine
30 end program p