public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31291]  New: Different (wrong?) behaviour using ffps when enabling optimizing
@ 2007-03-21  7:13 mail at sebastianbauer dot info
  2007-03-21  7:14 ` [Bug c/31291] " mail at sebastianbauer dot info
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mail at sebastianbauer dot info @ 2007-03-21  7:13 UTC (permalink / raw)
  To: gcc-bugs

The purpose of the attached code is to print out the internal representation of
some floating points. However, when compiling with optimizations turned on the
behaviour of the compiled program is not the expected one (i.e. the proper hex
representation is not printed out, but something else, here 0). I encounter
this behaviour on amd64 debian as on windows using cygwin gcc.

I'm going to attach the debian output of compilation and invocation.


-- 
           Summary: Different (wrong?) behaviour using ffps when enabling
                    optimizing
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mail at sebastianbauer dot info
 GCC build triplet: x86_64
  GCC host triplet: x86_64
GCC target triplet: x86_64


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


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

* [Bug c/31291] Different (wrong?) behaviour using ffps when enabling optimizing
  2007-03-21  7:13 [Bug c/31291] New: Different (wrong?) behaviour using ffps when enabling optimizing mail at sebastianbauer dot info
@ 2007-03-21  7:14 ` mail at sebastianbauer dot info
  2007-03-21  7:15 ` mail at sebastianbauer dot info
  2007-03-21  9:59 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mail at sebastianbauer dot info @ 2007-03-21  7:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mail at sebastianbauer dot info  2007-03-21 07:14 -------
Created an attachment (id=13240)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13240&action=view)
The simple test source.


-- 


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


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

* [Bug c/31291] Different (wrong?) behaviour using ffps when enabling optimizing
  2007-03-21  7:13 [Bug c/31291] New: Different (wrong?) behaviour using ffps when enabling optimizing mail at sebastianbauer dot info
  2007-03-21  7:14 ` [Bug c/31291] " mail at sebastianbauer dot info
@ 2007-03-21  7:15 ` mail at sebastianbauer dot info
  2007-03-21  9:59 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mail at sebastianbauer dot info @ 2007-03-21  7:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mail at sebastianbauer dot info  2007-03-21 07:15 -------
Created an attachment (id=13241)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13241&action=view)
The output of the compiler invocation and the executable.


-- 


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


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

* [Bug c/31291] Different (wrong?) behaviour using ffps when enabling optimizing
  2007-03-21  7:13 [Bug c/31291] New: Different (wrong?) behaviour using ffps when enabling optimizing mail at sebastianbauer dot info
  2007-03-21  7:14 ` [Bug c/31291] " mail at sebastianbauer dot info
  2007-03-21  7:15 ` mail at sebastianbauer dot info
@ 2007-03-21  9:59 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-21  9:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2007-03-21 09:59 -------
You are violating C aliasing rules.  Use a union or memcpy to access the fp
value.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|Different (wrong?) behaviour|Different (wrong?) behaviour
                   |using ffps when enabling    |using ffps when enabling
                   |optimizing                  |optimizing


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


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

end of thread, other threads:[~2007-03-21  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21  7:13 [Bug c/31291] New: Different (wrong?) behaviour using ffps when enabling optimizing mail at sebastianbauer dot info
2007-03-21  7:14 ` [Bug c/31291] " mail at sebastianbauer dot info
2007-03-21  7:15 ` mail at sebastianbauer dot info
2007-03-21  9:59 ` rguenth 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).