This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ping: backport to 4.3 the fix for middle-end/36578


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]