view gcc/testsuite/gfortran.dg/fraction.f90 @ 128:fe568345ddd5

fix CbC-example
author mir3636
date Wed, 11 Apr 2018 19:32:28 +0900
parents 04ced10e8804
children 84e7813d76e9
line wrap: on
line source

! { dg-do run }
!
! Test for pr52413
!

program test_frac

  real :: y
  y=fraction (-2.0) 
  if (fraction (-2.0) /= -0.5) call abort ()
  if (fraction (-0.0) /= 0.0) call abort ()
  if (sign(1.0, fraction(-0.0)) /= -1.0) call abort ()
  if (fraction (-2.0_8) /=  -0.5) call abort ()

end program test_frac