[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Lower / array-copy-semantics.f90
blob614ca43bbe4fcd32b66cccb281e29838fce015f0
1 ! RUN: bbc %s -o - | FileCheck %s
3 ! CHECK-LABEL: _QPsub
5 ! F77 code for the array computation c = ((a + b) * c) + (b / 2.0).
6 ! (Eventually, test that the temporary arrays are eliminated.)
7 subroutine sub(a,b,c,i,j,k)
8 real a(i,j,k), b(i,j,k), c(i,j,k)
9 real t1(i,j,k), t2(i,j,k)
10 integer i, j, k
11 integer r, s, t
13 do t = 1, k
14 do s = 1, j
15 do r = 1, i
16 t1(r,s,t) = a(r,s,t) + b(r,s,t)
17 end do
18 end do
19 end do
20 do t = 1, k
21 do s = 1, j
22 do r = 1, i
23 t2(r,s,t) = t1(r,s,t) * c(r,s,t)
24 end do
25 end do
26 end do
27 do t = 1, k
28 do s = 1, j
29 do r = 1, i
30 c(r,s,t) = t2(r,s,t) + b(r,s,t) / 2.0
31 end do
32 end do
33 end do
34 end subroutine sub