From 3e694268750d51acc6a68b0ee7ded25a52902c20 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 19 May 2013 18:40:25 +0000 Subject: Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490). --- sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c') diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c index b654bf5..bfcd110 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c @@ -21,6 +21,7 @@ when it's coded in C. */ #include +#include #include #include #include @@ -53,6 +54,8 @@ __nearbyintl (long double x) } u.dd[0] = high; u.dd[1] = 0.0; + math_force_eval (u.dd[0]); + math_force_eval (u.dd[1]); fesetenv (&env); } else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) @@ -109,6 +112,8 @@ __nearbyintl (long double x) } u.dd[0] = high + low; u.dd[1] = high - u.dd[0] + low; + math_force_eval (u.dd[0]); + math_force_eval (u.dd[1]); fesetenv (&env); } -- cgit v1.1