aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-expr.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5f2707e..d1b20a7 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * trans-expr.c (gfc_conv_cst_int_power): Only check for
+ flag_unsafe_math_optimizations if we have a float type.
+
2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 8832b33..d132ccb 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -542,7 +542,8 @@ gfc_conv_cst_int_power (gfc_se * se, tree lhs, tree rhs)
n = abs (TREE_INT_CST_LOW (rhs));
sgn = tree_int_cst_sgn (rhs);
- if ((!flag_unsafe_math_optimizations || optimize_size) && (n > 2 || n < -1))
+ if (((FLOAT_TYPE_P (type) && !flag_unsafe_math_optimizations) || optimize_size)
+ && (n > 2 || n < -1))
return 0;
/* rhs == 0 */