summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-16 17:46:18 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-16 17:46:18 +0000
commit65c1bbc8a054bdeb74272b8c2a2a1cfbffc0c13c (patch)
tree4fcc61c564a3aeb5b8ce2531639f4d9f9f834f1f /tests
parentbf71fd487cfd1a9d6f071a11bc08fc28c6203b6d (diff)
downloadmpfr-65c1bbc8a054bdeb74272b8c2a2a1cfbffc0c13c.tar.gz
tests/tset_ld.c: Add test case for the bug fixed with r6101.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6124 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/tset_ld.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tset_ld.c b/tests/tset_ld.c
index ab5636dbe..c136d422e 100644
--- a/tests/tset_ld.c
+++ b/tests/tset_ld.c
@@ -144,6 +144,21 @@ test_small (void)
mpfr_clear (z);
}
+static void
+test_fixed_bugs (void)
+{
+ mpfr_t x;
+ long double d;
+ long e;
+
+ /* bug found by Steve Kargl (2009-03-14) */
+ mpfr_init2 (x, 64);
+ mpfr_set_ui_2exp (x, 1, -16447, MPFR_RNDN);
+ d = mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */
+
+ mpfr_clear (x);
+}
+
int
main (int argc, char *argv[])
{
@@ -163,6 +178,7 @@ main (int argc, char *argv[])
#endif
check_gcc33_bug ();
+ test_fixed_bugs ();
tests_start_mpfr ();
mpfr_test_init ();