diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-12-27 16:56:38 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-12-27 08:56:38 -0800 |
commit | 201a97b4799fd44526a65abbcc2621f7d27766f7 (patch) | |
tree | 755ec5c29830edaf281fefe4be74c9a67dff2f73 /gcc/fortran/trans-expr.c | |
parent | 963fe8080208894c60961f3b4d1f8ea90ddd1aad (diff) | |
download | gcc-201a97b4799fd44526a65abbcc2621f7d27766f7.zip gcc-201a97b4799fd44526a65abbcc2621f7d27766f7.tar.gz gcc-201a97b4799fd44526a65abbcc2621f7d27766f7.tar.bz2 |
trans-expr.c (gfc_conv_cst_int_power): Only check for flag_unsafe_math_optimizations if we have a float type.
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.
From-SVN: r92644
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |