]> gcc.gnu.org Git - gcc.git/commitdiff
f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL family of intrinsic...
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 30 Mar 2009 17:37:02 +0000 (17:37 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Mon, 30 Mar 2009 17:37:02 +0000 (17:37 +0000)
* f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
family of intrinsics instead of BUILT_IN_INF family.
* trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.

From-SVN: r145307

gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c
gcc/fortran/trans-intrinsic.c

index bcb3a6022f29f531b98798f62b3d9dde4d60ddbb..51f82c5a39b7da589997004387b7ac099e7cd7af 100644 (file)
@@ -1,3 +1,10 @@
+2009-03-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
+       family of intrinsics instead of BUILT_IN_INF family.
+       * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
+       BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
+
 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
 
        * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
index a7d6c8f66a5facebd389c477253b803c4568f0ec..b8f2d221801f407f0be16b61651bc9e167305baa 100644 (file)
@@ -917,12 +917,12 @@ gfc_init_builtin_functions (void)
   gfc_define_builtin ("__builtin_fmodf", mfunc_float[1], 
                      BUILT_IN_FMODF, "fmodf", true);
 
-  gfc_define_builtin ("__builtin_infl", mfunc_longdouble[3], 
-                     BUILT_IN_INFL, "__builtin_infl", true);
-  gfc_define_builtin ("__builtin_inf", mfunc_double[3], 
-                     BUILT_IN_INF, "__builtin_inf", true);
-  gfc_define_builtin ("__builtin_inff", mfunc_float[3], 
-                     BUILT_IN_INFF, "__builtin_inff", true);
+  gfc_define_builtin ("__builtin_huge_vall", mfunc_longdouble[3], 
+                     BUILT_IN_HUGE_VALL, "__builtin_huge_vall", true);
+  gfc_define_builtin ("__builtin_huge_val", mfunc_double[3], 
+                     BUILT_IN_HUGE_VAL, "__builtin_huge_val", true);
+  gfc_define_builtin ("__builtin_huge_valf", mfunc_float[3], 
+                     BUILT_IN_HUGE_VALF, "__builtin_huge_valf", true);
 
   /* lround{f,,l} and llround{f,,l} */
   type = tree_cons (NULL_TREE, float_type_node, void_list_node);
index c2525bfa68d609ca64e00951e775fa895eafe1dd..a8ac42ea74fb569f68ab70a3991b1cb907e4f668 100644 (file)
@@ -3130,32 +3130,32 @@ gfc_conv_intrinsic_fraction (gfc_se * se, gfc_expr * expr)
 
 
 /* NEAREST (s, dir) is translated into
-     tmp = copysign (INF, dir);
+     tmp = copysign (HUGE_VAL, dir);
      return nextafter (s, tmp);
  */
 static void
 gfc_conv_intrinsic_nearest (gfc_se * se, gfc_expr * expr)
 {
   tree args[2], type, tmp;
-  int nextafter, copysign, inf;
+  int nextafter, copysign, huge_val;
 
   switch (expr->ts.kind)
     {
       case 4:
        nextafter = BUILT_IN_NEXTAFTERF;
        copysign = BUILT_IN_COPYSIGNF;
-       inf = BUILT_IN_INFF;
+       huge_val = BUILT_IN_HUGE_VALF;
        break;
       case 8:
        nextafter = BUILT_IN_NEXTAFTER;
        copysign = BUILT_IN_COPYSIGN;
-       inf = BUILT_IN_INF;
+       huge_val = BUILT_IN_HUGE_VAL;
        break;
       case 10:
       case 16:
        nextafter = BUILT_IN_NEXTAFTERL;
        copysign = BUILT_IN_COPYSIGNL;
-       inf = BUILT_IN_INFL;
+       huge_val = BUILT_IN_HUGE_VALL;
        break;
       default:
        gcc_unreachable ();
@@ -3164,7 +3164,7 @@ gfc_conv_intrinsic_nearest (gfc_se * se, gfc_expr * expr)
   type = gfc_typenode_for_spec (&expr->ts);
   gfc_conv_intrinsic_function_args (se, expr, args, 2);
   tmp = build_call_expr (built_in_decls[copysign], 2,
-                        build_call_expr (built_in_decls[inf], 0),
+                        build_call_expr (built_in_decls[huge_val], 0),
                         fold_convert (type, args[1]));
   se->expr = build_call_expr (built_in_decls[nextafter], 2,
                              fold_convert (type, args[0]), tmp);
This page took 0.070191 seconds and 5 git commands to generate.