Is this redundant?

Torbjorn Granlund tg at
Sun Nov 16 21:03:38 CET 2008

Paul Zimmermann <Paul.Zimmermann at> writes:

  Remember that res might equal op1 and/or op2. In that case the call
  to _mpz_realloc will change the pointer op1->_mp_d and/or op2->_mp_d.
  However if res = op1 or res = op1, then I guess
  ALLOC(res) >= min(ALLOC(op1), ALLOC(op2)) is true, thus it seems to me that
  the case ALLOC(res) < res_size <= MIN (op1_size, op2_size) cannot happen.

True!  That was to subtle for me, at least when I wrote this code.

I'll fix that, since GMP should not waste cycles like this!

  At least this case is not covered by "make check".
This is a known limitation of "make check"; it never triggers impossible
cases.  :-)


More information about the gmp-discuss mailing list