public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/29253]  New: expand_abs wrong default code for floating point
@ 2006-09-27 16:37 dje at gcc dot gnu dot org
  2006-09-28  9:59 ` [Bug middle-end/29253] " rguenth at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-09-27 16:37 UTC (permalink / raw)
  To: gcc-bugs

When expanding fabs inline, GCC attempts to use a sequence without jumps.  If
that sequence fails, GCC falls back to the equivalent of

if (x >= 0.0)
  return x;
return -x;

This sequence is incorrect for the IEEE floating point value -0.0.

This problem normally does not occur because most architectures have an
instruction to compute fabs or one can perform bit-twiddling, especially for
software floating point emulation.  However, for the cases such as software
floating point emulation of long double, the jump sequence is produced, leading
to wrong results for the corner case.


-- 
           Summary: expand_abs wrong default code for floating point
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dje at gcc dot gnu dot org
 GCC build triplet: *-*-*
  GCC host triplet: *-*-*
GCC target triplet: *-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29253


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <bug-29253-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2023-06-02  0:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-27 16:37 [Bug middle-end/29253] New: expand_abs wrong default code for floating point dje at gcc dot gnu dot org
2006-09-28  9:59 ` [Bug middle-end/29253] " rguenth at gcc dot gnu dot org
2008-02-03 14:38 ` steven at gcc dot gnu dot org
2008-02-04 14:28 ` dje at gcc dot gnu dot org
2008-02-04 14:52 ` rguenth at gcc dot gnu dot org
2008-02-04 14:57 ` rguenth at gcc dot gnu dot org
2008-02-04 15:08 ` rguenth at gcc dot gnu dot org
2008-02-04 16:30 ` bergner at gcc dot gnu dot org
2008-02-04 17:05 ` bergner at gcc dot gnu dot org
2008-02-05 10:55 ` rguenth at gcc dot gnu dot org
2008-02-05 16:39 ` bergner at gcc dot gnu dot org
2008-02-05 19:35 ` bergner at gcc dot gnu dot org
     [not found] <bug-29253-4@http.gcc.gnu.org/bugzilla/>
2021-08-08 21:47 ` pinskia at gcc dot gnu.org
2023-06-01 23:42 ` pinskia at gcc dot gnu.org
2023-06-02  0:05 ` pinskia at gcc dot gnu.org

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