if (mpfr_sgn (y) < 0)
mpfr_neg (result, result, GFC_RND_MODE);
}
- else
- {
+ else
+ {
if (mpfr_sgn (y) == 0)
mpfr_set_ui (result, 0, GFC_RND_MODE);
else
/* Function to return a constant expression node of a given type and
kind. */
-gfc_expr *
+gfc_expr *
gfc_constant_result (bt type, int kind, locus * where)
{
gfc_expr *result;
static arith
gfc_arith_uplus (gfc_expr * op1, gfc_expr ** resultp)
{
-
*resultp = gfc_copy_expr (op1);
return ARITH_OK;
}
static int
compare_complex (gfc_expr * op1, gfc_expr * op2)
{
-
return (mpfr_cmp (op1->value.complex.r, op2->value.complex.r) == 0
&& mpfr_cmp (op1->value.complex.i, op2->value.complex.i) == 0);
}
gfc_expr * op1, gfc_expr * op2,
gfc_expr ** result)
{
-
if (op1->expr_type == EXPR_CONSTANT && op2->expr_type == EXPR_CONSTANT)
return eval (op1, op2, result);
static int
gfc_zero_size_array (gfc_expr * e)
{
-
if (e->expr_type != EXPR_ARRAY)
return 0;
static gfc_expr *
reduce_binary0 (gfc_expr * op1, gfc_expr * op2)
{
-
if (gfc_zero_size_array (op1))
{
gfc_free_expr (op2);
static void
arith_error (arith rc, gfc_typespec * from, gfc_typespec * to, locus * where)
{
-
gfc_error ("%s converting %s to %s at %L", gfc_arith_error (rc),
gfc_typename (from), gfc_typename (to), where);