From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22022 invoked by alias); 16 Jul 2009 08:31:28 -0000 Received: (qmail 21983 invoked by uid 48); 16 Jul 2009 08:31:15 -0000 Date: Thu, 16 Jul 2009 08:31:00 -0000 Message-ID: <20090716083115.21982.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/40757] gcc 4.4.0 miscompiles mpfr-2.4.1 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikpe at it dot uu dot se" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg01338.txt.bz2 ------- 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