public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39986]  New: decimal float constant is incorrect when cc1 is a 64-bit binary
@ 2009-04-30 23:59 janis at gcc dot gnu dot org
  2009-05-01 18:58 ` [Bug target/39986] " janis at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-04-30 23:59 UTC (permalink / raw)
  To: gcc-bugs

When cc1 for powerpc64-linux is a 32-bit binary, compiling

  _Decimal32 x = 1.2df;

with "-m64 -S" results in:

        .file   "df.c"
        .section        ".toc","aw"
        .section        ".text"
        .globl x
        .section        ".data"
        .align 2
        .type   x, @object
        .size   x, 4
x:
        .long   574619666
        .ident  "GCC: (GNU) 4.5.0 20090430 (experimental) [trunk revision
147009]"

When the same compiler is built to be a 64-bit binary then the result is the
same except for

        .size   x, 4
x:
        .long   2467972673108443136

I normally configure GCC using --with-cpu=default32 and haven't yet checked to
see long the bug has existed; perhaps as long as GCC has supported decimal
float arithmetic.

If check_effective_target_dfprt_nocache fails then the tests in gcc.dg/dfp are
treated as compile-only and the struct-layout-1 tests do not support decimal
float types, and currently there is no test for the correct constant value so
the bug was not detected by running the testsuite.


-- 
           Summary: decimal float constant is incorrect when cc1 is a 64-bit
                    binary
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


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


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

end of thread, other threads:[~2009-05-13 20:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 23:59 [Bug target/39986] New: decimal float constant is incorrect when cc1 is a 64-bit binary janis at gcc dot gnu dot org
2009-05-01 18:58 ` [Bug target/39986] " janis at gcc dot gnu dot org
2009-05-01 19:04 ` janis at gcc dot gnu dot org
2009-05-04 21:24 ` janis at gcc dot gnu dot org
2009-05-06 17:02 ` [Bug middle-end/39986] " janis at gcc dot gnu dot org
2009-05-06 17:19 ` janis at gcc dot gnu dot org
2009-05-07 13:15 ` hjl dot tools at gmail dot com
2009-05-07 13:22 ` hjl dot tools at gmail dot com
2009-05-07 21:39 ` janis at gcc dot gnu dot org
2009-05-07 21:43 ` janis at gcc dot gnu dot org
2009-05-13 20:46 ` 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).