]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans-expr.c (gfc_conv_cst_int_power): Only check for flag_unsafe_math_optimizations...
authorAndrew Pinski <pinskia@physics.uc.edu>
Mon, 27 Dec 2004 16:56:38 +0000 (16:56 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Mon, 27 Dec 2004 16:56:38 +0000 (08:56 -0800)
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

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c

index 5f2707e67720be9bfe81ee2c965c2e5b3b8d5ff0..d1b20a73650f8760b88c035a605e7db00e86b027 100644 (file)
@@ -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
index 8832b33f6db27342c81475346216996ab4bd6639..d132ccb2b42e586ea51b1126d104be783af05eb8 100644 (file)
@@ -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  */