From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27036 invoked by alias); 29 Jan 2013 19:47:47 -0000 Received: (qmail 26952 invoked by uid 55); 29 Jan 2013 19:47:25 -0000 From: "aldyh at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55939] [4.6/4.7/4.8 regression] gcc miscompiles gmp-5.0.5 on m68k-linux Date: Tue, 29 Jan 2013 19:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-01/txt/msg02679.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55939 --- Comment #16 from Aldy Hernandez 2013-01-29 19:47:24 UTC --- >> double d, d2; >> ... >> if (d != d2) { >> dumpd(d,d2); >> return -1; >> } >> >> By this point, "d" and "d2" are in fp2/fp3, and we compare them in >> extended-precision real mode (fcmp.x) below: > At this point alarm bells are already ringing... When I see EQ/NE > comparisons of floating points, there's a good bet something is wrong. For the record, only the EQ/NE above comes from GMP. The other one (in dumpd()) I added myself in testing. But yes, that one "d != d2" is in the original testcase. I will try the various suggestions and report back. Thanks everyone.