From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DEBA385781A; Wed, 17 Mar 2021 10:23:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DEBA385781A From: "williambader at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99621] [8/9/10/11 Regression] Wrong code with -m32 -O1 -fcaller-saves -fexpensive-optimizations since g:058e97ecf33ad0dfd926b3876a4bcf59ac9556ff Date: Wed, 17 Mar 2021 10:23:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ra X-Bugzilla-Severity: normal X-Bugzilla-Who: williambader at hotmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 10:23:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99621 --- Comment #24 from William Bader --- Jakub was right. I didn't understand what he meant at first. Sorry about th= at. I can confirm `gcc -m32 -O9 -fexcess-precision=3Dstandard gcc-bug1-init.c` = on the original example works correctly for me. If I change line 758 (the line after #if BUG_FIX) from if (new_qxd4_y =3D=3D cur_qxd4_y && new_qxd4_x > cur_qxd4_x) { to if (new_qxd4_y >=3D cur_qxd4_y - 0.001 && new_qxd4_y <=3D cur_qxd4_y + 0.= 001 && new_qxd4_x > cur_qxd4_x) { then it also works. Years ago I did scientific programming in fortran, and I should have rememb= ered from that never to compare two real numbers for equality.=