From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 50A9F38582B9; Wed, 31 Jan 2024 08:52:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50A9F38582B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706691159; bh=Y617PU9sAtrms2aHkZGXQBRlhfdZBf26XURx7Ru5iS4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C4JhDWgy0wY6g0tsvgqNZJ9tHjLctxmEL/Z4fJ88UJS9Phj9vRYRAZFze6buhGn7z xPXsSpLyIdNIqPXTmPUbTk/SmJiuZrvBQ+IVPpv5xsLMR2RvTrGww9N3N/7IrSqnx8 j59qUYl/ZvY07arvAcmJazNoGy05P7mlGzs7BJV4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113679] long long minus double with gcc -m32 produces different results than other compilers or gcc -m64 Date: Wed, 31 Jan 2024 08:52:15 +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: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113679 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Andrew Pinski --- [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c [apinski@xeond2 gcc]$ ./a.out -2.000000 [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c -fexcess-precision=3Dstandard [apinski@xeond2 gcc]$ ./a.out 0.000000 [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c -msse2 -mfpmath= =3Dsse [apinski@xeond2 gcc]$ ./a.out 0.000000 Yes it is due to excessive precision of x87. Use either `-fexcess-precision=3Dstandard` or `-msse2 -mfpmath=3Dsse` if you don't wan= t to use the execessive precision of the x87 FP. *** This bug has been marked as a duplicate of bug 323 ***=