summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/aint_anint_1.f90
blob: aadb62cd96d0021f283cd464ccb77a7625012d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do run }
program aint_anint_1
    
  implicit none

  real(4) :: r = 42.7, r1, r2
  real(8) :: s = 42.7D0, s1, s2

  r1 = aint(r)
  r2 = aint(r,kind=8)
  if (abs(r1 - r2) > 0.1) call abort()

  r1 = anint(r)
  r2 = anint(r,kind=8)
  if (abs(r1 - r2) > 0.1) call abort()

  s1 = aint(s)
  s2 = aint(s, kind=4)
  if (abs(s1 - s2) > 0.1) call abort()

  s1 = anint(s)
  s2 = anint(s, kind=4)
  if (abs(s1 - s2) > 0.1) call abort()


end program aint_anint_1