aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r--gcc/fortran/arith.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index dd72f44..c770569 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -1806,38 +1806,6 @@ gfc_multiply (gfc_expr *op1, gfc_expr *op2)
gfc_expr *
gfc_divide (gfc_expr *op1, gfc_expr *op2)
{
- if (op2 && op2->expr_type == EXPR_CONSTANT)
- {
- arith rc = ARITH_OK;
- switch (op2->ts.type)
- {
- case BT_INTEGER:
- /* non-integer divided by integer 0 is handled elsewhere. */
- if (mpz_sgn (op2->value.integer) == 0
- && op1->ts.type == BT_INTEGER)
- rc = ARITH_DIV0;
- break;
- case BT_REAL:
- if (mpfr_sgn (op2->value.real) == 0
- && flag_range_check == 1)
- rc = ARITH_DIV0;
- break;
- case BT_COMPLEX:
- if (mpc_cmp_si_si (op2->value.complex, 0, 0) == 0
- && flag_range_check == 1)
- rc = ARITH_DIV0;
- break;
- default:
- /* basic type is non-numeric, handle this elsewhere. */
- break;
- }
- if (rc == ARITH_DIV0)
- {
- gfc_seen_div0 = true;
- gfc_error ("Division by zero at %L", &op2->where);
- return NULL;
- }
- }
return eval_intrinsic_f3 (INTRINSIC_DIVIDE, gfc_arith_divide, op1, op2);
}