patches/gmp/4.3.1/110-unbounded-alloc.patch
author Arnaud Lacombe <lacombar@gmail.com>
Thu Aug 05 17:59:51 2010 +0200 (2010-08-05)
changeset 2069 366bd2b22675
permissions -rw-r--r--
complibs/mpc: fix MPC 0.8.1 build with MPFR 3.0.0

This is the change introduced by revision 734 of MPC repository.

Author: Paul Zimmermann <Paul.Zimmermann@loria.fr>
Revision log: [acos.c] fixed problem with GMP_RNDA (should be MPFR_RNDA, and code was wrong)

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
     1 diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
     2 --- a/mpn/generic/toom44_mul.c
     3 +++ b/mpn/generic/toom44_mul.c
     4 @@ -116,17 +116,16 @@
     5  
     6    TMP_MARK;
     7  
     8 -  as1  = TMP_SALLOC_LIMBS (n + 1);
     9 -  asm1 = TMP_SALLOC_LIMBS (n + 1);
    10 -  as2  = TMP_SALLOC_LIMBS (n + 1);
    11 -  ash  = TMP_SALLOC_LIMBS (n + 1);
    12 -  asmh = TMP_SALLOC_LIMBS (n + 1);
    13 -
    14 -  bs1  = TMP_SALLOC_LIMBS (n + 1);
    15 -  bsm1 = TMP_SALLOC_LIMBS (n + 1);
    16 -  bs2  = TMP_SALLOC_LIMBS (n + 1);
    17 -  bsh  = TMP_SALLOC_LIMBS (n + 1);
    18 -  bsmh = TMP_SALLOC_LIMBS (n + 1);
    19 +  as1  = TMP_ALLOC_LIMBS (10 * n + 10);
    20 +  asm1 = as1  + n + 1;
    21 +  as2  = asm1 + n + 1;
    22 +  ash  = as2  + n + 1;
    23 +  asmh = ash  + n + 1;
    24 +  bs1  = asmh + n + 1;
    25 +  bsm1 = bs1  + n + 1;
    26 +  bs2  = bsm1 + n + 1;
    27 +  bsh  = bs2  + n + 1;
    28 +  bsmh = bsh  + n + 1;
    29  
    30    gp = pp;
    31    hp = pp + n + 1;