modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / do_concurrent_2.f90
blobf9a6879fbed671997fa8a17a40e83a17a2a0fc6e
1 ! { dg-do run }
3 ! PR fortran/44646
5 ! DO CONCURRENT
7 implicit none
8 integer :: i, j
9 integer :: A(5,5)
11 A = 0.0
12 do concurrent (i=1:5, j=1:5, (i/=j))
13 if (i == 5) cycle
14 A(i,j) = i*j
15 end do
17 if (any (A(:,1) /= [0, 2, 3, 4, 0])) STOP 1
18 if (any (A(:,2) /= [2, 0, 6, 8, 0])) STOP 2
19 if (any (A(:,3) /= [3, 6, 0, 12, 0])) STOP 3
20 if (any (A(:,4) /= [4, 8, 12, 0, 0])) STOP 4
21 if (any (A(:,5) /= [5, 10, 15, 20, 0])) STOP 5
23 A = -99
25 do concurrent (i = 1 : 5)
26 forall (j=1:4, i/=j)
27 A(i,j) = i*j
28 end forall
29 if (i == 5) then
30 A(i,i) = -i
31 end if
32 end do
34 if (any (A(:,1) /= [-99, 2, 3, 4, 5])) STOP 6
35 if (any (A(:,2) /= [ 2, -99, 6, 8, 10])) STOP 7
36 if (any (A(:,3) /= [ 3, 6, -99, 12, 15])) STOP 8
37 if (any (A(:,4) /= [ 4, 8, 12, -99, 20])) STOP 9
38 if (any (A(:,5) /= [-99, -99, -99, -99, -5])) STOP 10
40 end