From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F4035387085D; Thu, 7 May 2020 15:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F4035387085D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588866363; bh=w3Hwev/xd90Ig+1asq0YAJ0nyTdhQE1T6thOjvzuNVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PJXyWsQ3JZJY9+a86nZBj6YukqMTOcpvMKbFrJlXFHc87RWkJB5UXCyUFVAWlSiLV YJtY+glDTJdXqjLzBnfs8zbvsKhiSTnxJsG/BhVrR7DklToZvsRGqSpFsKox8Rv5Ug npDFHMfAep0f/bZE33TMAYg/DF/VjBo9i+GkncAc= From: "tony.reix at atos dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94981] Wrong casts on Power machines dealing with fctiwuz instruction Date: Thu, 07 May 2020 15:46:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 9.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tony.reix at atos dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: 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: Thu, 07 May 2020 15:46:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94981 --- Comment #7 from Tony Reix --- (In reply to Andreas Schwab from comment #1) > Converting a negative float to an unsigned integer is undefined. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf says (page 43): If the value of the integral part cannot be represented by the integer type, the behavior is undefined.50) 50) The remaindering operation performed when a value of integer type is converted to unsigned type need not be performed when a value of real float= ing type is converted to unsigned type. Thus, the range of portable real floati= ng values is (=E2=88=921, Utype_MAX+1). Hummmmmmm=