1 C Test for bug in reg-stack handling conditional moves.
2 C Reported by Tim Prince <tprince@computer.org>
4 C { dg-do run { target "i[6789]86-*-*" } }
5 C { dg-options "-ffast-math -march=pentiumpro" }
7 double precision function foo
(x
, y
)
10 double precision a
, b
, c
, d
31 double precision tolerance
32 parameter (tolerance
=1.0D
-6)
34 C Each column is a pair of values to feed to foo,
35 C and its expected return value.
36 double precision a
(ntests
) /1, -23, -1, 1, 9, 10, -9/
37 double precision b
(ntests
) /1, -23, 12, -12, 10, 9, -10/
38 double precision x
(ntests
) /0, 0, 1, 1, 0.1, 0.1, 0.1/
41 double precision result
45 result
= foo
(a
(i
), b
(i
))
46 if (abs
(result
- x
(i
)) > tolerance
) then
47 print
*, i
, a
(i
), b
(i
), x
(i
), result