public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/30936] __builtin_nanf("") != __builtin_nanf("") is false for sh4-linux-gnu
Date: Mon, 26 Feb 2007 09:52:00 -0000	[thread overview]
Message-ID: <20070226095204.1308.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30936-14151@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-02-26 09:52 -------
>In attach you can find the nanf-test.s that doesn't contains any reference 
> to nanf symbol.

That is ok, because nanf("") is foldded into a constant and the function is not
called.
I don't read sh asm that well but it looks like:
        mov     #0,r1

is wrong, it should be instead:
mov #1, r1


If I changed nanf(") to __builtin_nanf("") on powerpc-darwin, I get:
        li r0,1
        stw r0,56(r30)
        lwz r0,56(r30)
        cmpwi cr7,r0,0

So it is doing the correct thing there.

So this still has nothing to do with the nanf prototype really.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|const attribute in nanf     |__builtin_nanf("") !=
                   |prototype causes gcc not    |__builtin_nanf("") is false
                   |producing correct code.     |for sh4-linux-gnu


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


  parent reply	other threads:[~2007-02-26  9:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 15:39 [Bug c/30936] New: const attribute in nanf prototype causes gcc not producing correct code filippo dot arcidiacono at gmail dot com
2007-02-23 15:43 ` [Bug c/30936] " filippo dot arcidiacono at gmail dot com
2007-02-23 17:39 ` pinskia at gcc dot gnu dot org
2007-02-26  8:08 ` filippo dot arcidiacono at gmail dot com
2007-02-26  8:21 ` [Bug target/30936] " pinskia at gcc dot gnu dot org
2007-02-26  9:29 ` filippo dot arcidiacono at gmail dot com
2007-02-26  9:52 ` pinskia at gcc dot gnu dot org [this message]
2007-02-26 13:01 ` [Bug target/30936] __builtin_nanf("") != __builtin_nanf("") is false for sh4-linux-gnu filippo dot arcidiacono at gmail dot com
2007-02-26 18:02 ` 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=20070226095204.1308.qmail@sourceware.org \
    --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).