Fortran: fix wrong rebase that broke bootstrap
Sorry... gcc/fortran/ * trans-intrinsic.cc (conv_intrinsic_ieee_comparison): Only define it once.
This commit is contained in:
parent
dca2874897
commit
23ad5ed743
1 changed files with 0 additions and 86 deletions
|
@ -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. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue