annotate gcc/testsuite/gfortran.dg/nearest_1.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-O0 -ffloat-store" }
kono
parents:
diff changeset
3 ! { dg-add-options ieee }
kono
parents:
diff changeset
4 ! { dg-skip-if "Denormals not supported" { spu-*-* } }
kono
parents:
diff changeset
5 ! PR fortran/27021
kono
parents:
diff changeset
6 ! Original code submitted by Dominique d'Humieres
kono
parents:
diff changeset
7 ! Converted to Dejagnu for the testsuite by Steven G. Kargl
kono
parents:
diff changeset
8 program chop
kono
parents:
diff changeset
9 integer ix, iy
kono
parents:
diff changeset
10 real o, t, td, tu, x, y
kono
parents:
diff changeset
11 o = 1.
kono
parents:
diff changeset
12 t = tiny(o)
kono
parents:
diff changeset
13 td = nearest(t,-1.0)
kono
parents:
diff changeset
14 x = td/2.0
kono
parents:
diff changeset
15 y = nearest(tiny(o),-1.0)/2.0
kono
parents:
diff changeset
16 ix = transfer(x,ix)
kono
parents:
diff changeset
17 iy = transfer(y,iy)
kono
parents:
diff changeset
18 if (ix /= iy) call abort
kono
parents:
diff changeset
19 end program chop
kono
parents:
diff changeset
20