summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-06-07 00:44:56 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-06-07 00:44:56 +0000
commit85506fabed83a493972ca3654ad0d6f445148241 (patch)
treee1e154955eb40be54422252089c9ceb30723364d /tests
parent7c540331f0126e634bd24c5d13f77ac1dfd5e862 (diff)
parent45abf6eaaf2b4986c138cc1a961466ee5d239ba2 (diff)
downloadmpfr-85506fabed83a493972ca3654ad0d6f445148241.tar.gz
Merged the latest changes from the trunk.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/ubf@10448 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/tlgamma.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tlgamma.c b/tests/tlgamma.c
index 9d3689e95..3d686a6fc 100644
--- a/tests/tlgamma.c
+++ b/tests/tlgamma.c
@@ -385,11 +385,33 @@ mpfr_lgamma1 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t r)
return mpfr_lgamma (y, &sign, x, r);
}
+/* Since r10377, the following test causes a "too much memory" error
+ when MPFR is built with Debian's tcc 0.9.27~git20151227.933c223-1
+ on x86_64. The problem came from __gmpfr_ceil_log2, now fixed in
+ r10443 (according to the integer promotion rules, this appeared to
+ be a bug in tcc, not in MPFR; however relying on such an obscure
+ rule was not a good idea). */
+static void
+tcc_bug20160606 (void)
+{
+ mpfr_t x, y;
+ int sign;
+
+ mpfr_init2 (x, 53);
+ mpfr_init2 (y, 53);
+ mpfr_set_ui_2exp (x, 1, -1, MPFR_RNDN);
+ mpfr_lgamma (y, &sign, x, MPFR_RNDN);
+ mpfr_clear (x);
+ mpfr_clear (y);
+}
+
int
main (void)
{
tests_start_mpfr ();
+ tcc_bug20160606 ();
+
special ();
test_generic (MPFR_PREC_MIN, 100, 2);