]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR middle-end/36578 (cast to long double not taken into account when...
authorJanis Johnson <janis187@us.ibm.com>
Wed, 25 Feb 2009 22:08:55 +0000 (22:08 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Wed, 25 Feb 2009 22:08:55 +0000 (22:08 +0000)
commite37a69be3f595ed32c1f40a219b1b1c592191582
tree8efe12fcf6a46c582d68af59f70128de5cd91b90
parent95261ad60555343f4c049942ab1c8dc7e278d023
backport: re PR middle-end/36578 (cast to long double not taken into account when result stored to a double)

2009-02-25  Janis Johnson  <janis187@us.ibm.com>

gcc/
Backport from mainline:
2008-10-29  Joseph Myers  <joseph@codesourcery.com>

PR middle-end/36578
* convert.c (convert_to_real): Do not optimize conversions of
binary arithmetic operations between binary and decimal
floating-point types.  Consider mode of target type in determining
decimal type for arithmetic.  Unless
flag_unsafe_math_optimizations, do not optimize binary conversions
where this may change rounding behavior.
* real.c (real_can_shorten_arithmetic): New.
* real.h (real_can_shorten_arithmetic): Declare.

gcc/testsuite/
Backport from mainline:
2008-10-29  Joseph Myers  <joseph@codesourcery.com>

PR middle-end/36578
* gcc.dg/dfp/convert-bfp-13.c, gcc.dg/dfp/convert-bfp-14.c,
gcc.dg/dfp/convert-dfp-fold-2.c, gcc.target/i386/pr36578-1.c,
gcc.target/i386/pr36578-2.c: New tests.

From-SVN: r144436
gcc/ChangeLog
gcc/convert.c
gcc/real.c
gcc/real.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pr39034.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr36578-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr36578-2.c [new file with mode: 0644]