public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lucier at math dot purdue.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/51446] -fno-trapping-math generates NaN constant with different sign Date: Wed, 07 Dec 2011 21:07:00 -0000 [thread overview] Message-ID: <bug-51446-4-YMURH6QMsp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51446-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51446 --- Comment #3 from lucier at math dot purdue.edu 2011-12-07 21:07:09 UTC --- I've looked through the code in real.c a bit (and perhaps the component of this bug report should be changed). It appears that do_divide, when given 0.0/0.0, calls get_canonical_qnan with sign=0 (line 816 in real.c), but divsd actually returns a qnan with sign bit = 1. Similarly, do_add when given Inf - Inf, calls get_canonical_qnan with sign bit = 0 (line 574 of real.c), while subsd returns a qnan with sign bit = 1. It seems that the sign bit in this situation should be target-dependent if you want the constants to match what the actual instructions will provide.
next prev parent reply other threads:[~2011-12-07 21:07 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-07 1:38 [Bug tree-optimization/51446] New: " lucier at math dot purdue.edu 2011-12-07 12:52 ` [Bug tree-optimization/51446] " rguenth at gcc dot gnu.org 2011-12-07 19:56 ` lucier at math dot purdue.edu 2011-12-07 21:07 ` lucier at math dot purdue.edu [this message] 2011-12-08 10:41 ` [Bug middle-end/51446] " rguenth at gcc dot gnu.org 2011-12-08 14:31 ` lucier at math dot purdue.edu 2011-12-08 14:38 ` lucier at math dot purdue.edu 2011-12-08 15:32 ` kargl at gcc dot gnu.org 2011-12-08 16:19 ` dominiq at lps dot ens.fr 2011-12-08 17:08 ` lucier at math dot purdue.edu 2011-12-08 18:36 ` lucier at math dot purdue.edu 2011-12-08 19:01 ` jakub at gcc dot gnu.org 2011-12-08 20:46 ` joseph at codesourcery dot com 2011-12-08 20:55 ` lucier at math dot purdue.edu 2011-12-08 22:33 ` joseph at codesourcery dot com 2013-01-10 1:05 ` joel at gcc dot gnu.org 2021-12-17 20:22 ` lucier at math dot purdue.edu 2021-12-17 20:23 ` lucier at math dot purdue.edu 2022-03-12 15:22 ` roger at nextmovesoftware dot com 2023-10-02 0:02 ` pinskia at gcc dot gnu.org 2023-10-02 0:58 ` eggert at cs dot ucla.edu 2023-10-02 11:09 ` amonakov at gcc dot gnu.org 2023-10-02 17:23 ` joseph at codesourcery dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-51446-4-YMURH6QMsp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).