From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82C38385DC1F; Sun, 17 May 2020 00:23:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82C38385DC1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589675009; bh=Y++uPgmQ4fhCwelkhzCeu7zrq7tFjeGJHYKJf83RnTg=; h=From:To:Subject:Date:From; b=t9qYxirkur0TJM+dfimbCuGl+w23fMK6lVUD7p/PN0UdHIQ9kdz2x3jMKNZ9bMlxe s9IRHGl/TcvVSl2zd9TwkyOOekPkf4p744Vqma+3Tm/+0musoqKaJ11MGQk3ecWmr5 1aqoYu/4sWxRb2MCRWySLWvow95Na9O8Q9/KcAXw= From: "samuel.thibault@ens-lyon.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/95169] New: i386 comparison between nan and 0.0 triggers Invalid operation exception Date: Sun, 17 May 2020 00:23:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: samuel.thibault@ens-lyon.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: Sun, 17 May 2020 00:23:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95169 Bug ID: 95169 Summary: i386 comparison between nan and 0.0 triggers Invalid operation exception Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: samuel.thibault@ens-lyon.org Target Milestone: --- Created attachment 48549 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48549&action=3Dedit testcase Hello, On building the attached testcase with=20 gcc-10 -m32 test.c -o test -march=3Di386 -mtune=3Dgeneric -lm its execution prints "0 1", i.e. an Invalid operation exception is raised by the mere comparison of y (that contains NaN) against 0.0. This was tested with Debian's gcc-10 10.1.0-1. This does not happen with previous versions of gcc. This happens with half = of the values of -mtune (I'll attach the details) ; this also happens with -march=3Di486, i586, pentium ; this does not happen with -march=3Di686 or pentiumpro etc. (whatever the value of -mtune). Samuel=