summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr32533.f90
blob: c312415eb02aae06b21c6e969787c57cd47a1014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! { dg-options "-O2 -ftree-vectorize -ffast-math" }
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
SUBROUTINE T(nsubcell,sab_max,subcells)
  INTEGER, PARAMETER :: dp=KIND(0.0D0)
  REAL(dp) :: sab_max(3), subcells,nsubcell(3)
  nsubcell(:) = MIN(MAX(1,NINT(0.5_dp*subcells/sab_max(:))),20)
END SUBROUTINE T

INTEGER, PARAMETER :: dp=KIND(0.0D0)
REAL(dp) :: sab_max(3), subcells,nsubcell(3)
subcells=2.0_dp
sab_max=0.590060749244805_dp
CALL T(nsubcell,sab_max,subcells)
IF (ANY(nsubcell.NE.2.0_dp)) CALL ABORT()
END