public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/95351] [11/12/13/14 Regression] Comparison with NAN optimizes incorrectly with -ffast-math disabled
Date: Mon, 11 Mar 2024 02:59:14 +0000	[thread overview]
Message-ID: <bug-95351-4-3CBGlZxu7U@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95351-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95351

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:31ce2e993d09dcad1ce139a2848a28de5931056d

commit r14-9422-g31ce2e993d09dcad1ce139a2848a28de5931056d
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Sun Mar 10 22:17:09 2024 +0000

    Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351]

    The problem here is that merge_truthop_with_opposite_arm would
    use the type of the result of the comparison rather than the operands
    of the comparison to figure out if we are honoring NaNs.
    This fixes that oversight and now we get the correct results in this
    case.

    Committed as obvious after a bootstrap/test on x86_64-linux-gnu.

            PR middle-end/95351

    gcc/ChangeLog:

            * fold-const.cc (merge_truthop_with_opposite_arm): Use
            the type of the operands of the comparison and not the type
            of the comparison.

    gcc/testsuite/ChangeLog:

            * gcc.dg/float_opposite_arm-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

  parent reply	other threads:[~2024-03-11  2:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 21:39 [Bug c++/95351] New: " chris.dahlberg at cytovale dot com
2020-05-26 22:22 ` [Bug c++/95351] " pinskia at gcc dot gnu.org
2020-05-26 23:07 ` glisse at gcc dot gnu.org
2024-03-10  3:44 ` [Bug middle-end/95351] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-03-10 21:06 ` pinskia at gcc dot gnu.org
2024-03-11  2:59 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-11  2:59 ` [Bug middle-end/95351] [11/12/13 " pinskia at gcc dot gnu.org
2024-03-12  6:41 ` cvs-commit at gcc dot gnu.org
2024-03-12  6:42 ` [Bug middle-end/95351] [11/12 " pinskia at gcc dot gnu.org
2024-05-08 16:16 ` cvs-commit at gcc dot gnu.org
2024-05-08 16:19 ` cvs-commit at gcc dot gnu.org
2024-05-08 16:19 ` pinskia at gcc dot gnu.org

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-95351-4-3CBGlZxu7U@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: link
Be 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).