This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36578] cast to long double not taken into account when result stored to a double
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Oct 2008 17:06:31 -0000
- Subject: [Bug middle-end/36578] cast to long double not taken into account when result stored to a double
- References: <bug-36578-6373@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jsm28 at gcc dot gnu dot org 2008-10-29 17:06 -------
Subject: Bug 36578
Author: jsm28
Date: Wed Oct 29 17:05:42 2008
New Revision: 141432
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141432
Log:
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.
testsuite:
* 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.
Added:
trunk/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
trunk/gcc/testsuite/gcc.dg/dfp/convert-bfp-14.c
trunk/gcc/testsuite/gcc.dg/dfp/convert-dfp-fold-2.c
trunk/gcc/testsuite/gcc.target/i386/pr36578-1.c
trunk/gcc/testsuite/gcc.target/i386/pr36578-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/convert.c
trunk/gcc/real.c
trunk/gcc/real.h
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36578