public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/111701] New: [11/12/13/14 Regression] wrong code for __builtin_signbit(x*x)
@ 2023-10-05  8:12 amonakov at gcc dot gnu.org
  2023-10-06  7:47 ` [Bug middle-end/111701] " rguenth at gcc dot gnu.org
  2024-04-26  8:31 ` roger at nextmovesoftware dot com
  0 siblings, 2 replies; 3+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-10-05  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111701
           Summary: [11/12/13/14 Regression] wrong code for
                    __builtin_signbit(x*x)
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amonakov at gcc dot gnu.org
                CC: amonakov at gcc dot gnu.org, eggert at cs dot ucla.edu,
                    rguenth at gcc dot gnu.org, unassigned at gcc dot gnu.org
        Depends on: 111655
  Target Milestone: ---
            Target: x86_64-linux-gnu

+++ This bug was initially created as a clone of Bug #111655 +++

See bug 111655 comment 11: we incorrectly deduce nonnegative_p for
floating-point 'x * x', and the following aborts:

__attribute__((noipa))
static int f(float *x)
{
    *x *= *x;
    return __builtin_signbit(*x);
}

int main()
{
    float x = -__builtin_nan("");
    int s = f(&x);
    if (s != __builtin_signbit(x))
        __builtin_abort();
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655
[Bug 111655] [11/12/13/14 Regression] wrong code generated for
__builtin_signbit and 0./0. on x86-64 -O2

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-26  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05  8:12 [Bug middle-end/111701] New: [11/12/13/14 Regression] wrong code for __builtin_signbit(x*x) amonakov at gcc dot gnu.org
2023-10-06  7:47 ` [Bug middle-end/111701] " rguenth at gcc dot gnu.org
2024-04-26  8:31 ` roger at nextmovesoftware dot com

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).