public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ddneilson at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/23469] New: Behaviour of built-in __signbitf(x) differs with optimization
Date: Thu, 18 Aug 2005 20:43:00 -0000	[thread overview]
Message-ID: <20050818204303.23469.ddneilson@gmail.com> (raw)

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


             reply	other threads:[~2005-08-18 20:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 20:43 ddneilson at gmail dot com [this message]
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

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=20050818204303.23469.ddneilson@gmail.com \
    --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).