This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ping: backport to 4.3 the fix for middle-end/36578
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: joseph at codesourcery dot com, richard dot guenther at gmail dot com
- Date: Wed, 25 Feb 2009 10:27:15 -0800
- Subject: ping: backport to 4.3 the fix for middle-end/36578
- Reply-to: janis187 at us dot ibm dot com
Ping:
http://gcc.gnu.org/ml/gcc-patches/2009-02/msg00434.html
This patch backports to the 4.3 branch a mainline fix for a regression
introduced in 3.4. The backport is not complete as it omits additional
checks for rounding that are not available in the 4.3 branch, but it is
an improvement and fixes middle-end/36578 and c/39034, a wrong-code bug
for decimal float.
Here's the ChangeLog entry for the fix; there are also new tests:
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.
I've copied Joseph, who wrote the original patch, and Richard Guenther,
who approved it.
Janis