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/107668] [13 Regression] ICE: in clear_nan, at value-range.h:1167 with -fsanitize=float-cast-overflow and _Complex int
Date: Wed, 16 Nov 2022 06:36:27 +0000	[thread overview]
Message-ID: <bug-107668-4-iXr759DvyM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107668-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:7c6cd9c05efca29a1a9635b81c86cbad25bbdbbe

commit r13-4081-g7c6cd9c05efca29a1a9635b81c86cbad25bbdbbe
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Nov 16 07:30:07 2022 +0100

    ragen-op-float: Fix up float_binary_op_range_finish [PR107668]

    The following testcase ICEs, because when !HONOR_NANS but
    HONOR_SIGNED_ZEROS, if we see
    lhs = op1 * op2;
    and know that lhs is [-0.0, 0.0] and op2 is [0.0, 0.0], the
    division of these two yields UNDEFINED and clear_nan () on it
    fails an assert.  With HONOR_NANS it would actually result in
    a known NAN, but when NANs aren't honored, we clear the NAN bits.
    Now, for the above case we actually don't know anything about
    the op1 range (except that it isn't a NAN/INF because of
    !HONOR_NANS !HONOR_INFINITIES), so I think the best is just
    to return VARYING for the case we get UNDEFINED as well.

    If we want, the op[12]_range methods perhaps can handle the
    corner cases earlier separately, say for
    lhs [0.0, 0.0] and op2 [0.0, 0.0] when HONOR_SIGNED_ZEROS this
    would be just [0.0, MAX].

    2022-11-16  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/107668
            * range-op-float.cc (float_binary_op_range_finish): Set VARYING
            also when r is UNDEFINED.

            * gcc.dg/ubsan/pr107668.c: New test.

  parent reply	other threads:[~2022-11-16  6:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 19:36 [Bug tree-optimization/107668] New: " zsojka at seznam dot cz
2022-11-13 21:01 ` [Bug tree-optimization/107668] " dcb314 at hotmail dot com
2022-11-13 21:32 ` dcb314 at hotmail dot com
2022-11-14  8:13 ` dcb314 at hotmail dot com
2022-11-14  8:34 ` dcb314 at hotmail dot com
2022-11-14  8:50 ` dcb314 at hotmail dot com
2022-11-14  9:14 ` dcb314 at hotmail dot com
2022-11-14 14:04 ` rguenth at gcc dot gnu.org
2022-11-14 14:28 ` jakub at gcc dot gnu.org
2022-11-15  8:19 ` jakub at gcc dot gnu.org
2022-11-15  8:29 ` jakub at gcc dot gnu.org
2022-11-15 16:26 ` aldyh at gcc dot gnu.org
2022-11-16  6:36 ` cvs-commit at gcc dot gnu.org [this message]
2022-11-16  8:23 ` jakub 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-107668-4-iXr759DvyM@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).