From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 02B4C385800D; Sun, 11 Sep 2022 15:34:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02B4C385800D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662910443; bh=2t85rH0/fTyBRmqFnJu1Q1UJYCJxBEs7AXVeG9KY2b4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gPwsPkeoWaCEiUKkvLg5eH4p23PDVT8R9jeexMb+BJZGtQqnM32NH3NguleAZd5k2 DKIND7+0Pl0X9PSSTdhWzPT+YcCfURHFrWPiIS7igtDrUk6O3uVAW8qSR2AhwgQ8SM CfU1LgAUqZm6qA6AuByfbohtRkoLZsCS38Cq5DEI= From: "fantasquex at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug build/29501] Check failed on stdlib/tst-strfrom while building for RISCV64 on a unmatched hardware Date: Sun, 11 Sep 2022 15:34:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fantasquex at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29501 --- Comment #5 from Letu Ren --- As mentioned in 11.3 section of the latest RISC-V ISA manual 20191213,=20 Except when otherwise stated, if the result of a floating-point operation is NaN, it is the canonical NaN. The canonical NaN has a positive sign and all significand bits clear except the MSB, a.k.a. the quiet bit. For single-precision floating-point, this corresponds to the pattern 0x7fc00000. And in section 6.3 of the latest version of IEEE 754 which is published in 2019, When either an input or result is a NaN, this standard does not interpret t= he sign of a NaN. So, I think the problem is that IEEE 754 doesn't care about the sign bit of NAN. And RISC-V ISA follows IEEE 754 and sets the default sign bit of NAN to positive. The test case fails. Maybe we can change the test case a little b= it, since the sign bit of NAN doesn't matter? BTW, I'm interested in "hook" you mentioned. Which part of code should I ta= ke a look? --=20 You are receiving this mail because: You are on the CC list for the bug.=