]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: fix wrong rebase that broke bootstrap
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 20 Jul 2023 09:55:59 +0000 (11:55 +0200)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Thu, 20 Jul 2023 09:55:59 +0000 (11:55 +0200)
Sorry...

gcc/fortran/

* trans-intrinsic.cc (conv_intrinsic_ieee_comparison): Only
define it once.

gcc/fortran/trans-intrinsic.cc

index e0f86b1ab551e4a6d834ed9a305dd046daa3d491..289309190a5e4820b6afb5d5bcd22aba5ebd5f0f 100644 (file)
@@ -10462,92 +10462,6 @@ conv_intrinsic_ieee_comparison (gfc_se * se, gfc_expr * expr, int signaling,
 }
 
 
-/* Generate code for comparison functions IEEE_QUIET_* and
-   IEEE_SIGNALING_*.  */
-
-static void
-conv_intrinsic_ieee_comparison (gfc_se * se, gfc_expr * expr, int signaling,
-                               const char *name)
-{
-  tree args[2];
-  tree arg1, arg2, res;
-
-  /* Evaluate arguments only once.  */
-  conv_ieee_function_args (se, expr, args, 2);
-  arg1 = gfc_evaluate_now (args[0], &se->pre);
-  arg2 = gfc_evaluate_now (args[1], &se->pre);
-
-  if (startswith (name, "eq"))
-    {
-      if (signaling)
-       res = build_call_expr_loc (input_location,
-                                  builtin_decl_explicit (BUILT_IN_ISEQSIG),
-                                  2, arg1, arg2);
-      else
-       res = fold_build2_loc (input_location, EQ_EXPR, logical_type_node,
-                              arg1, arg2);
-    }
-  else if (startswith (name, "ne"))
-    {
-      if (signaling)
-       {
-         res = build_call_expr_loc (input_location,
-                                    builtin_decl_explicit (BUILT_IN_ISEQSIG),
-                                    2, arg1, arg2);
-         res = fold_build1_loc (input_location, TRUTH_NOT_EXPR,
-                                logical_type_node, res);
-       }
-      else
-       res = fold_build2_loc (input_location, NE_EXPR, logical_type_node,
-                              arg1, arg2);
-    }
-  else if (startswith (name, "ge"))
-    {
-      if (signaling)
-       res = fold_build2_loc (input_location, GE_EXPR, logical_type_node,
-                              arg1, arg2);
-      else
-       res = build_call_expr_loc (input_location,
-                                  builtin_decl_explicit (BUILT_IN_ISGREATEREQUAL),
-                                  2, arg1, arg2);
-    }
-  else if (startswith (name, "gt"))
-    {
-      if (signaling)
-       res = fold_build2_loc (input_location, GT_EXPR, logical_type_node,
-                              arg1, arg2);
-      else
-       res = build_call_expr_loc (input_location,
-                                  builtin_decl_explicit (BUILT_IN_ISGREATER),
-                                  2, arg1, arg2);
-    }
-  else if (startswith (name, "le"))
-    {
-      if (signaling)
-       res = fold_build2_loc (input_location, LE_EXPR, logical_type_node,
-                              arg1, arg2);
-      else
-       res = build_call_expr_loc (input_location,
-                                  builtin_decl_explicit (BUILT_IN_ISLESSEQUAL),
-                                  2, arg1, arg2);
-    }
-  else if (startswith (name, "lt"))
-    {
-      if (signaling)
-       res = fold_build2_loc (input_location, LT_EXPR, logical_type_node,
-                              arg1, arg2);
-      else
-       res = build_call_expr_loc (input_location,
-                                  builtin_decl_explicit (BUILT_IN_ISLESS),
-                                  2, arg1, arg2);
-    }
-  else
-    gcc_unreachable ();
-
-  se->expr = fold_convert (gfc_typenode_for_spec (&expr->ts), res);
-}
-
-
 /* Generate code for an intrinsic function from the IEEE_ARITHMETIC
    module.  */