public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dje at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/30704] [4.2/4.3 Regression] Incorrect constant generation for long long
Date: Mon, 12 Mar 2007 22:21:00 -0000	[thread overview]
Message-ID: <20070312222051.5289.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30704-276@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from dje at gcc dot gnu dot org  2007-03-12 22:20 -------
I do not believe this is an endian issue.  It is a coincidence that the output
value looks like the original constant.  GCC converts the __builtin_memcpy()
into a VIEW_CONVERT_EXPR<double>.  The constant is equivalent to a NaN and GCC
uses the value CONST_DOUBLE NaN, not the original bits.  real.c converts the
CONST_DOUBLE NaN into a ieee_double NaN, which happens to look like the value
printed.  On little endian targets, the words are swapped, which just happens
to look like the original constant.

If the VIEW_CONVERT_EXPR<double> is valid, manipulating it like a NaN seems
valid.


-- 


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


  parent reply	other threads:[~2007-03-12 22:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05  0:56 [Bug rtl-optimization/30704] New: " danglin at gcc dot gnu dot org
2007-02-05 10:16 ` [Bug rtl-optimization/30704] " rguenth at gcc dot gnu dot org
2007-02-05 19:43 ` [Bug middle-end/30704] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-02-19 21:05 ` mmitchel at gcc dot gnu dot org
2007-03-12 20:19 ` dje at gcc dot gnu dot org
2007-03-12 22:21 ` dje at gcc dot gnu dot org [this message]
2007-03-12 22:25 ` pinskia at gcc dot gnu dot org
2007-03-12 22:38 ` pinskia at gcc dot gnu dot org
2007-03-12 22:44 ` pinskia at gcc dot gnu dot org
2007-03-12 23:08 ` pinskia at gcc dot gnu dot org
2007-03-12 23:19 ` pinskia at gcc dot gnu dot org
2007-03-12 23:21 ` pinskia at gcc dot gnu dot org
2007-03-13  0:10 ` pinskia at gcc dot gnu dot org
2007-03-13 22:16 ` pinskia at gcc dot gnu dot org
2007-03-14  6:09 ` pinskia at gcc dot gnu dot org
2007-04-02 13:59 ` jakub at gcc dot gnu dot org
2007-04-03  9:06 ` jakub at gcc dot gnu dot org
2007-04-03  9:23 ` jakub at gcc dot gnu dot org
2007-04-03 11:33 ` jakub 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=20070312222051.5289.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).