summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-04-22 15:10:28 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-04-22 15:10:28 +0000
commita7b7ef5f9999066f3de13670f52c3da33e0d6455 (patch)
treea25909b1de7d3b39cfc2ab914f39565c59154626 /src
parent1a3a889333fe9cdf2cd671f7863a2c13af6f2bdc (diff)
downloadmpfr-a7b7ef5f9999066f3de13670f52c3da33e0d6455.tar.gz
[src/atan.c] Added an assertion.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13885 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r--src/atan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/atan.c b/src/atan.c
index f7c369c2c..cb021f5d2 100644
--- a/src/atan.c
+++ b/src/atan.c
@@ -64,6 +64,7 @@ set_table (mpfr_t y, const mp_limb_t x[3])
mp_limb_t *yp = MPFR_MANT(y);
MPFR_UNSIGNED_MINUS_MODULO (sh, p);
+ MPFR_ASSERTD (n >= 1 && n <= 3);
mpn_copyi (yp, x + 3 - n, n);
/* FIXME: yp is used uninitialized in some code path.
Found by -fanalyzer with GCC 10.0.1 20200418 (experimental). */