From bb9d434404b559a11bd2f85f0ce8085c77b8c4c8 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 1 Sep 2022 17:00:14 +0200 Subject: Convert rest of compiler to dconst[n]inf. gcc/ChangeLog: * builtins.cc (fold_builtin_inf): Convert use of real_info to dconstinf. (fold_builtin_fpclassify): Same. * fold-const-call.cc (fold_const_call_cc): Same. * match.pd: Same. * omp-low.cc (omp_reduction_init_op): Same. * realmpfr.cc (real_from_mpfr): Same. * tree.cc (build_complex_inf): Same. --- gcc/builtins.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'gcc/builtins.cc') diff --git a/gcc/builtins.cc b/gcc/builtins.cc index f1f7c0c..5f319b2 100644 --- a/gcc/builtins.cc +++ b/gcc/builtins.cc @@ -8696,8 +8696,6 @@ fold_builtin_strlen (location_t loc, tree expr, tree type, tree arg) static tree fold_builtin_inf (location_t loc, tree type, int warn) { - REAL_VALUE_TYPE real; - /* __builtin_inff is intended to be usable to define INFINITY on all targets. If an infinity is not available, INFINITY expands "to a positive constant of type float that overflows at translation @@ -8708,8 +8706,7 @@ fold_builtin_inf (location_t loc, tree type, int warn) if (!MODE_HAS_INFINITIES (TYPE_MODE (type)) && warn) pedwarn (loc, 0, "target format does not support infinity"); - real_inf (&real); - return build_real (type, real); + return build_real (type, dconstinf); } /* Fold function call to builtin sincos, sincosf, or sincosl. Return @@ -9336,9 +9333,8 @@ fold_builtin_fpclassify (location_t loc, tree *args, int nargs) if (tree_expr_maybe_infinite_p (arg)) { - real_inf (&r); tmp = fold_build2_loc (loc, EQ_EXPR, integer_type_node, arg, - build_real (type, r)); + build_real (type, dconstinf)); res = fold_build3_loc (loc, COND_EXPR, integer_type_node, tmp, fp_infinite, res); } -- cgit v1.1