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
* [Bug middle-end/111701] [11/12/13/14 Regression] wrong code for __builtin_signbit(x*x)
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 ` rguenth at gcc dot gnu.org
2024-04-26 8:31 ` roger at nextmovesoftware dot com
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-06 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111701
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-10-06
Priority|P3 |P2
Target Milestone|--- |11.5
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/111701] [11/12/13/14 Regression] wrong code for __builtin_signbit(x*x)
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
1 sibling, 0 replies; 3+ messages in thread
From: roger at nextmovesoftware dot com @ 2024-04-26 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111701
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |roger at nextmovesoftware dot com
--- Comment #2 from Roger Sayle <roger at nextmovesoftware dot com> ---
A patch to provide a possible solution/workaround has been proposed at
https://gcc.gnu.org/pipermail/gcc-patches/2024-April/650054.html
With that change, compiling the code in the original description with the
-fsignaling-nans command line option, avoids the abort.
^ 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).