2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr32533.f90
blobc312415eb02aae06b21c6e969787c57cd47a1014
1 ! { dg-do run }
2 ! { dg-options "-O2 -ftree-vectorize -ffast-math" }
4 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
6 SUBROUTINE T(nsubcell,sab_max,subcells)
7 INTEGER, PARAMETER :: dp=KIND(0.0D0)
8 REAL(dp) :: sab_max(3), subcells,nsubcell(3)
9 nsubcell(:) = MIN(MAX(1,NINT(0.5_dp*subcells/sab_max(:))),20)
10 END SUBROUTINE T
12 INTEGER, PARAMETER :: dp=KIND(0.0D0)
13 REAL(dp) :: sab_max(3), subcells,nsubcell(3)
14 subcells=2.0_dp
15 sab_max=0.590060749244805_dp
16 CALL T(nsubcell,sab_max,subcells)
17 IF (ANY(nsubcell.NE.2.0_dp)) CALL ABORT()
18 END