[Bug target/39986] decimal float constant is incorrect when cc1 is a 64-bit binary

2009-05-04 Thread janis at gcc dot gnu dot org
--- Comment #3 from janis at gcc dot gnu dot org 2009-05-04 21:24 --- On x86_64 with a 64-bit compiler, positive decimal float constants are OK, negative decimal float constants are wrong for both -m64 (the default) and -m32. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39986

[Bug target/39986] decimal float constant is incorrect when cc1 is a 64-bit binary

2009-05-01 Thread janis at gcc dot gnu dot org
--- Comment #2 from janis at gcc dot gnu dot org 2009-05-01 19:03 --- D'oh, I of course meant that long is 32-bits when GCC is build with default -m32 and that long is 64-bits when GCC is built with default -m64; the host size of long, not the target size. -- http://gcc.gnu.org/bugz

[Bug target/39986] decimal float constant is incorrect when cc1 is a 64-bit binary

2009-05-01 Thread janis at gcc dot gnu dot org
--- Comment #1 from janis at gcc dot gnu dot org 2009-05-01 18:57 --- The problem is that in dfp.c, functions encode_decimal* and decode_decimal* use memcpy from a 32-bit int to a long for 32 bits. This works fine with -32 where long is 32 bits, but not for -m64 where long is 32 bits.