2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr46519-2.f90
blobbe810cca616d110a1119e1495e21100b1cdbf613
1 ! { dg-do compile { target i?86-*-* x86_64-*-* } }
2 ! { dg-options "-O3 -mavx -mvzeroupper -mtune=generic -dp" }
4 SUBROUTINE func(kts, kte, qrz, qiz, rho)
5 IMPLICIT NONE
6 INTEGER, INTENT(IN) :: kts, kte
7 REAL, DIMENSION(kts:kte), INTENT(INOUT) :: qrz, qiz, rho
8 INTEGER :: k
9 REAL, DIMENSION(kts:kte) :: praci, vtiold
10 REAL :: fluxout
11 INTEGER :: min_q, max_q, var
12 do k=kts,kte
13 praci(k)=1.0
14 enddo
15 min_q=kte
16 max_q=kts-1
17 DO var=1,20
18 do k=max_q,min_q,-1
19 fluxout=rho(k)*qrz(k)
20 enddo
21 qrz(min_q-1)=qrz(min_q-1)+fluxout
22 ENDDO
23 DO var=1,20
24 do k=kts,kte-1
25 vtiold(k)= (rho(k))**0.16
26 enddo
27 ENDDO
28 STOP
29 END SUBROUTINE func
31 ! { dg-final { scan-assembler "avx_vzeroupper" } }