public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/23469] New: Behaviour of built-in __signbitf(x) differs with optimization
@ 2005-08-18 20:43 ddneilson at gmail dot com
  2005-08-18 20:44 ` [Bug other/23469] " ddneilson at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ddneilson at gmail dot com @ 2005-08-18 20:43 UTC (permalink / raw)
  To: gcc-bugs

The return value of the builtin signbit(x) macro (called with a float argument)
differs when compiling with optimizations or not

When optimizations are off the return value is 0x8000 or 0 (signbit set and
not-set, respectively).

When optimizations are on (-O1) return value is 1 or 0 (signbit set and not-set,
respectively).

 I'll attach a sample .cpp file, .ii file, and the output of -save-temps to this
report.

 The sample .cpp file shows a simple example. The function mysignbit() is
defined just as the __signbitf(x) function in include/bits/mathinline.h but
returns a different value than __signbitf(x) when compiling without
optimizations, but returns the same value when compiling with optimizations (-O1
and above).

-- 
           Summary: Behaviour of built-in __signbitf(x) differs with
                    optimization
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ddneilson at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2005-08-21 20:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-18 20:43 [Bug other/23469] New: Behaviour of built-in __signbitf(x) differs with optimization ddneilson at gmail dot com
2005-08-18 20:44 ` [Bug other/23469] " ddneilson at gmail dot com
2005-08-18 20:45 ` ddneilson at gmail dot com
2005-08-18 20:46 ` ddneilson at gmail dot com
2005-08-18 20:47 ` ddneilson at gmail dot com
2005-08-18 20:47 ` ddneilson at gmail dot com
2005-08-18 20:49 ` ddneilson at gmail dot com
2005-08-18 20:49 ` ddneilson at gmail dot com
2005-08-18 21:15 ` ddneilson at gmail dot com
2005-08-18 22:14 ` pinskia at gcc dot gnu dot org
2005-08-21 20:28 ` ddneilson at gmail dot com
2005-08-21 20:34 ` pinskia at gcc dot gnu dot 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).