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 tree-optimization/106785] ICE in fail, at selftest.cc:47 since r13-2266-g8bb1df032cc080
Date: Thu, 01 Sep 2022 07:09:50 +0000	[thread overview]
Message-ID: <bug-106785-4-ENF8DXXKCB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106785-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:bdfe0d1ce0aebdb68b77e2c04a0f45956c56b449

commit r13-2334-gbdfe0d1ce0aebdb68b77e2c04a0f45956c56b449
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Wed Aug 31 14:31:12 2022 +0200

    Make frange selftests work on !HONOR_NANS systems.

    I'm just shuffling the FP self tests here, with no change to existing
    functionality.

    If we agree that explicit NANs in the source code with !HONOR_NANS
    should behave any differently, I'm happy to address whatever needs
    fixing, but for now I'd like to unblock the !HONOR_NANS build systems.

    I have added an adaptation of a test Jakub suggested we handle in the PR:

    void funk(int cond)
    {
      float x;

      if (cond)
        x = __builtin_nan ("");
      else
        x = 1.24;

      bar(x);
    }

    For !HONOR_NANS, the range for the PHI of x_1 is the union of 1.24 and
    NAN which is really 1.24 with a maybe NAN.  This reflects the IL-- the
    presence of the actual NAN.  However, VRP will propagate this because
    it sees the 1.24 and ignores the possibility of a NAN, per
    !HONOR_NANS.  IMO, this is correct.  OTOH, for HONOR_NANS the unknown
    NAN property keeps us from propagating the value.

    Is there a reason we don't warn for calls to __builtin_nan when
    !HONOR_NANS?  That makes no sense to me.

            PR tree-optimization/106785

    gcc/ChangeLog:

            * value-range.cc (range_tests_nan): Adjust tests for !HONOR_NANS.
            (range_tests_floats): Same.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/vrp-float-nan-1.c: New test.

  parent reply	other threads:[~2022-09-01  7:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 11:01 [Bug rtl-optimization/106785] New: " marxin at gcc dot gnu.org
2022-08-31 11:18 ` [Bug rtl-optimization/106785] " aldyh at gcc dot gnu.org
2022-08-31 11:30 ` aldyh at gcc dot gnu.org
2022-08-31 11:33 ` aldyh at gcc dot gnu.org
2022-08-31 12:28 ` aldyh at gcc dot gnu.org
2022-08-31 12:41 ` jakub at gcc dot gnu.org
2022-08-31 13:12 ` aldyh at gcc dot gnu.org
2022-08-31 13:21 ` [Bug tree-optimization/106785] " aldyh at gcc dot gnu.org
2022-08-31 15:11 ` jakub at gcc dot gnu.org
2022-09-01  7:09 ` cvs-commit at gcc dot gnu.org [this message]
2022-09-01  7:12 ` aldyh 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-106785-4-ENF8DXXKCB@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).