diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-12-16 21:44:45 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-12-16 21:44:45 +0100 |
commit | c61819ff0f851ca343362f742f819bb459880eb6 (patch) | |
tree | d102a0fa85741b2b8e259078e943f9ba1f72a927 /gcc/fortran/arith.c | |
parent | 931977d9191b542c356d2dfa3258c8d09a6b8498 (diff) | |
download | gcc-c61819ff0f851ca343362f742f819bb459880eb6.zip gcc-c61819ff0f851ca343362f742f819bb459880eb6.tar.gz gcc-c61819ff0f851ca343362f742f819bb459880eb6.tar.bz2 |
re PR fortran/54687 (Use gcc option machinery for gfortran)
2014-12-16 Tobias Burnus <burnus@net-b.de>
PR fortran/54687
* gfortran.h (gfc_option_t): Remove flags which now
have a Var().
* lang.opt (flag-aggressive_function_elimination,
flag-align_commons, flag-all_intrinsics,
flag-allow_leading_underscore, flag-automatic, flag-backslash,
flag-backtrace, flag-blas_matmul_limit, flag-cray_pointer,
flag-dollar_ok, flag-dump_fortran_original,
flag-dump_fortran_optimized, flag-external_blas, flag-f2c,
flag-implicit_none, flag-max_array_constructor,
flag-module_private, flag-pack_derived, flag-range_check,
flag-recursive, flag-repack_arrays, flag-sign_zero,
flag-underscoring): Add Var() and, where applicable, Enum().
* options.c (gfc_init_options, gfc_post_options,
gfc_handle_option): Update for *.opt changes.
* arith.c: Update for flag-variable name changes.
* array.c: Ditto.
* cpp.c: Ditto.
* decl.c: Ditto.
* expr.c: Ditto.
* f95-lang.c: Ditto.
* frontend-passes.c: Ditto.
* intrinsic.c: Ditto.
* io.c: Ditto.
* match.c: Ditto.
* module.c: Ditto.
* parse.c: Ditto.
* primary.c: Ditto.
* resolve.c: Ditto.
* scanner.c: Ditto.
* simplify.c: Ditto.
* symbol.c: Ditto.
* trans-array.c: Ditto.
* trans-common.c: Ditto.
* trans-decl.c: Ditto.
* trans-expr.c: Ditto.
* trans-intrinsic.c: Ditto.
* trans-openmp.c: Ditto.
* trans-types.c: Ditto.
From-SVN: r218792
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r-- | gcc/fortran/arith.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 6394547..e8a5efe 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -301,7 +301,7 @@ gfc_check_integer_range (mpz_t p, int kind) } - if (gfc_option.flag_range_check == 0) + if (flag_range_check == 0) return result; if (mpz_cmp (p, gfc_integer_kinds[i].min_int) < 0 @@ -333,12 +333,12 @@ gfc_check_real_range (mpfr_t p, int kind) if (mpfr_inf_p (p)) { - if (gfc_option.flag_range_check != 0) + if (flag_range_check != 0) retval = ARITH_OVERFLOW; } else if (mpfr_nan_p (p)) { - if (gfc_option.flag_range_check != 0) + if (flag_range_check != 0) retval = ARITH_NAN; } else if (mpfr_sgn (q) == 0) @@ -348,14 +348,14 @@ gfc_check_real_range (mpfr_t p, int kind) } else if (mpfr_cmp (q, gfc_real_kinds[i].huge) > 0) { - if (gfc_option.flag_range_check == 0) + if (flag_range_check == 0) mpfr_set_inf (p, mpfr_sgn (p)); else retval = ARITH_OVERFLOW; } else if (mpfr_cmp (q, gfc_real_kinds[i].subnormal) < 0) { - if (gfc_option.flag_range_check == 0) + if (flag_range_check == 0) { if (mpfr_sgn (p) < 0) { @@ -736,7 +736,7 @@ gfc_arith_divide (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp) break; case BT_REAL: - if (mpfr_sgn (op2->value.real) == 0 && gfc_option.flag_range_check == 1) + if (mpfr_sgn (op2->value.real) == 0 && flag_range_check == 1) { rc = ARITH_DIV0; break; @@ -748,7 +748,7 @@ gfc_arith_divide (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp) case BT_COMPLEX: if (mpc_cmp_si_si (op2->value.complex, 0, 0) == 0 - && gfc_option.flag_range_check == 1) + && flag_range_check == 1) { rc = ARITH_DIV0; break; @@ -863,7 +863,7 @@ arith_power (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp) int i; i = gfc_validate_kind (BT_INTEGER, result->ts.kind, false); - if (gfc_option.flag_range_check) + if (flag_range_check) rc = ARITH_OVERFLOW; /* Still, we want to give the same value as the @@ -1978,7 +1978,7 @@ gfc_int2int (gfc_expr *src, int kind) /* If we do not trap numeric overflow, we need to convert the number to signed, throwing away high-order bits if necessary. */ - if (gfc_option.flag_range_check == 0) + if (flag_range_check == 0) { int k; |