[Bug c/40757] gcc 4.4.0 miscompiles mpfr-2.4.1

mikpe at it dot uu dot se gcc-bugzilla@gcc.gnu.org
Thu Jul 16 08:31:00 GMT 2009



------- Comment #6 from mikpe at it dot uu dot se  2009-07-16 08:31 -------
(In reply to comment #5)
> Created an attachment (id=18203)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18203&action=view) [edit]
> preprocessed version of the file mpn_exp.c from mpfr-2.4.1
> 
> Note that replacing line 74:
>    MPN_ZERO (a, n - 1);
> by:
>    { int n1 = n - 1; MPN_ZERO (a, n1); }
> fixes the problem, where MPN_ZERO is defined as:
> #define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB)
> and BYTES_PER_MP_LIMB is 4.
> 
> If I write "size_t n1" or "unsigned int n1" above instead of "int n1",
> the bug reappears.

Sounds a lot like PR39867 and PR40747 are hitting you. Can you grab those
fixes, apply them to your 4.4.0, rebuild it, and test mpfr again? Or get the
4.4.1-RC and test that instead.

I just finished building 4.3.4 and 4.4.0 on USIIIi/Solaris 9, and they built
gmp-4.2.4 and mpfr-2.4.1 fine, with both passing make check.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40757



More information about the Gcc-bugs mailing list