summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-06-06 23:09:17 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-06-06 23:09:17 +0000
commitb91d95a975f59c200fd8f455064a19dd2c588173 (patch)
treebb9c6e3e8c04d60c9a7a3df9ad5a694dba6a9708
parent447f45d74a98367210e108ce7bde60c2d945c840 (diff)
downloadmpfr-b91d95a975f59c200fd8f455064a19dd2c588173.tar.gz
[tests/tlgamma.c] Added a test causing a "too much memory" error with
tcc 0.9.27~git20151227.933c223-1 (there's already one in special(), but this one is a simpler, standalone test). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10442 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tlgamma.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/tlgamma.c b/tests/tlgamma.c
index 9d3689e95..a97daee20 100644
--- a/tests/tlgamma.c
+++ b/tests/tlgamma.c
@@ -385,11 +385,30 @@ 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. */
+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);