From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F401C385041C; Tue, 30 Mar 2021 12:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F401C385041C From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97653] Incorrect long double calculation with -mabi=ibmlongdouble Date: Tue, 30 Mar 2021 12:02:01 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: meissner at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Tue, 30 Mar 2021 12:02:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97653 --- Comment #13 from Jakub Jelinek --- (In reply to Jonathan Wakely from comment #11) > That tells me that using --with-long-double-format=3D{ibm,ieee} chooses > *which* of the 128-bit long double formats you want, and so > --with-long-double-128 is implied. Maybe I'm reading it wrong. At least from seeing what my cross-compiler does it is not implied. If I compile with those=20 -mno-gnu-attribute -mabi=3Dibmlongdouble options, scp assembly to gcc112, compile there (system compiler defaults to -mlong-double-128), it fails, if I compile locally with -mno-gnu-attribute -mabi=3Dibmlongdouble -mlong-double-128 and scp and do the same, it works. And I can't reproduce on gcc112 with 11.0.0 20210126 gcc natively built the= re which defaults to -mlong-double-128: ~/gcc/obj31/gcc/xgcc -B ~/gcc/obj31/gcc/ -B ~/gcc/obj31/powerpc64le-unknown-linux-gnu/libgcc/ -o pr97653{,.c} -static-libgcc -mno-gnu-attribute -mabi=3Dibmlongdouble ./pr97653 256 * 0.100000 =3D 25 256 * 0.200000 =3D 51 256 * 0.500000 =3D 128 256 * 0.900000 =3D 230=