--- Begin Message ---
Package:glibc
Version:2.3.6-7
Serverity:wishlist
Tags:patch
Could you please apply the following patch?
This patch is to fix build Error in math-tests.
Regards,
Kazuhiro Inaoka
2006-05-17 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* math/bug-nextafter.c (main): Add check FE_OVERFLOW.
* math/bug-nexttoward.c (main): Ditto.
* math/libm-test.inc (rint_test_tonearest): Add check FE_TONEAREST.
(rint_test_towardzero): Add check FE_TOWARDZERO
(rint_test_downward): Add check FE_DOWNWARD
(rint_test_upward): Add check FE_UPWARD
Index: math/bug-nextafter.c
===================================================================
RCS file: /cvs/glibc/libc/math/bug-nextafter.c,v
retrieving revision 1.3
diff -u -p -r1.3 bug-nextafter.c
--- math/bug-nextafter.c 9 Dec 2003 18:10:47 -0000 1.3
+++ math/bug-nextafter.c 17 May 2006 09:58:40 -0000
@@ -9,6 +9,7 @@ main (void)
{
int result = 0;
+#ifdef FE_OVERFLOW
float i = INFINITY;
float m = FLT_MAX;
feclearexcept (FE_ALL_EXCEPT);
@@ -58,6 +59,7 @@ main (void)
puts ("nextafter- did not overflow");
++result;
}
+#endif
return result;
}
Index: math/bug-nexttoward.c
===================================================================
RCS file: /cvs/glibc/libc/math/bug-nexttoward.c,v
retrieving revision 1.1
diff -u -p -r1.1 bug-nexttoward.c
--- math/bug-nexttoward.c 7 Dec 2003 21:13:09 -0000 1.1
+++ math/bug-nexttoward.c 17 May 2006 09:58:40 -0000
@@ -9,6 +9,7 @@ main (void)
{
int result = 0;
+#ifdef FE_OVERFLOW
long double tl = (long double) FLT_MAX + 0x1.0p128L;
float fi = INFINITY;
float m = FLT_MAX;
@@ -60,6 +61,7 @@ main (void)
puts ("nexttoward- did not overflow");
++result;
}
+#endif
return result;
}
Index: math/libm-test.inc
===================================================================
RCS file: /cvs/glibc/libc/math/libm-test.inc,v
retrieving revision 1.64.2.1
diff -u -p -r1.64.2.1 libm-test.inc
--- math/libm-test.inc 16 Feb 2005 10:07:17 -0000 1.64.2.1
+++ math/libm-test.inc 17 May 2006 09:58:41 -0000
@@ -3800,6 +3800,7 @@ rint_test_tonearest (void)
int save_round_mode;
START (rint_tonearest);
+#ifdef FE_TONEAREST
save_round_mode = fegetround();
if (!fesetround (FE_TONEAREST))
@@ -3817,6 +3818,7 @@ rint_test_tonearest (void)
}
fesetround(save_round_mode);
+#endif
END (rint_tonearest);
}
@@ -3827,6 +3829,7 @@ rint_test_towardzero (void)
int save_round_mode;
START (rint_towardzero);
+#ifdef FE_TOWARDZERO
save_round_mode = fegetround();
if (!fesetround (FE_TOWARDZERO))
@@ -3844,6 +3847,7 @@ rint_test_towardzero (void)
}
fesetround(save_round_mode);
+#endif
END (rint_towardzero);
}
@@ -3854,6 +3858,7 @@ rint_test_downward (void)
int save_round_mode;
START (rint_downward);
+#ifdef FE_DOWNWARD
save_round_mode = fegetround();
if (!fesetround (FE_DOWNWARD))
@@ -3871,6 +3876,7 @@ rint_test_downward (void)
}
fesetround(save_round_mode);
+#endif
END (rint_downward);
}
@@ -3881,6 +3887,7 @@ rint_test_upward (void)
int save_round_mode;
START (rint_upward);
+#ifdef FE_UPWARD
save_round_mode = fegetround();
if (!fesetround (FE_UPWARD))
@@ -3898,6 +3905,7 @@ rint_test_upward (void)
}
fesetround(save_round_mode);
+#endif
END (rint_upward);
}
--- End Message ---
--- Begin Message ---
- To: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>, 367633-done@bugs.debian.org
- Subject: Re: Bug#367633: [Patch] Fix build Error math-tests
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Mon, 2 Jun 2008 18:18:30 +0200
- Message-id: <20080602161830.GA25567@volta.aurel32.net>
- In-reply-to: <20060522035504.GA5707@nevyn.them.org>
- References: <446AF821.30607@renesas.com> <446EA605.2050505@aurel32.net> <4471072E.1080903@renesas.com> <20060522035504.GA5707@nevyn.them.org>
On Sun, May 21, 2006 at 11:55:04PM -0400, Daniel Jacobowitz wrote:
> On Mon, May 22, 2006 at 09:34:54AM +0900, Kazuhiro Inaoka wrote:
> > We use math libraries with generic sources in sysdeps(On new arch m32r).
> > These seem not to support the folloing macros kind of exception and
> > rounding modes. (It depends on implentaion. fenv.h)
> > FE_INEXACT, FE_DIVBYZERO, FE_UNDERFLOW, FE_OVERFLOW, FE_INVALID,
> > FE_ALL_EXCEPT,
> > FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO
> >
> > So build errors (undefined macro) happened at bug_nextafter.c,
> > bug-nexttoward.c, test_float.c, test_ifloat.c test_double.c and
> > test_idouble.c.
> >
> > Patches sent were to add to check the macros definition.
>
> If you don't have those macros, then the tests aren't testing what they
> say they're testing, and a certain amount of failure is to be expected.
>
Without any news on this, I am closing the bug report. Please reopen the
bug when you have a new patch.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
--- End Message ---