OSDN Git Service

PR rtl-optimization/50249
[pf3gnuchains/gcc-fork.git] / gcc / convert.c
index d72dda8..a647193 100644 (file)
@@ -469,6 +469,9 @@ convert_to_integer (tree type, tree expr)
          break;
 
        CASE_FLT_FN (BUILT_IN_ROUND):
+         /* Only convert in ISO C99 mode.  */
+         if (!TARGET_C99_FUNCTIONS)
+           break;
          if (outprec < TYPE_PRECISION (integer_type_node)
              || (outprec == TYPE_PRECISION (integer_type_node)
                  && !TYPE_UNSIGNED (type)))
@@ -487,11 +490,14 @@ convert_to_integer (tree type, tree expr)
            break;
          /* ... Fall through ...  */
        CASE_FLT_FN (BUILT_IN_RINT):
+         /* Only convert in ISO C99 mode.  */
+         if (!TARGET_C99_FUNCTIONS)
+           break;
          if (outprec < TYPE_PRECISION (integer_type_node)
              || (outprec == TYPE_PRECISION (integer_type_node)
                  && !TYPE_UNSIGNED (type)))
            fn = mathfn_built_in (s_intype, BUILT_IN_IRINT);
-         else if (outprec < TYPE_PRECISION (long_integer_type_node)
+         else if (outprec == TYPE_PRECISION (long_integer_type_node)
                   && !TYPE_UNSIGNED (type))
            fn = mathfn_built_in (s_intype, BUILT_IN_LRINT);
          else if (outprec == TYPE_PRECISION (long_long_integer_type_node)