From d284eb28eb6f3ef8c3f27e7428b8cdc8e51d965f Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 21 Jan 2005 17:54:26 +0000 Subject: re PR rtl-optimization/576 (gcc performs invalid optimization with float operations when different rounding mode.) PR rtl-optimization/576 * real.c (real_arithmetic): Change return type from void to bool to return an indication that the result may be inexact. * real.h (real_arithmeric): Update prototype. * fold-const.c (const_binop): Don't constant fold floating point expressions when the user specifies -frounding-math and the result may depend upon the run-time rounding mode. (fold_convert_const_real_from_real): Clean-up. (fold_initializer): Ignore flag_rounding_math for initializers. * simplify-rtx.c (simplify_binary_operation): Likewise, don't constant fold FP operations with flag_rounding_math if the result may depend upon the run-time rounding mode. From-SVN: r94020 --- gcc/real.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/real.h') diff --git a/gcc/real.h b/gcc/real.h index c477be1..b7cf3bb 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -160,7 +160,7 @@ extern const struct real_format * /* Declare functions in real.c. */ /* Binary or unary arithmetic on tree_code. */ -extern void real_arithmetic (REAL_VALUE_TYPE *, int, const REAL_VALUE_TYPE *, +extern bool real_arithmetic (REAL_VALUE_TYPE *, int, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *); /* Compare reals by tree_code. */ -- cgit v1.1