From a40e443fe8ce40cabbedbe4d134a3e7d397ea089 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Fri, 29 Sep 2006 04:51:53 +0000 Subject: [PATCH] arith.c (gfc_check_integer_range): Disable range checking via -fno-range-check. 2006-09-28 Steven G. Kargl fortran/29147 * arith.c (gfc_check_integer_range): Disable range checking via -fno-range-check. From-SVN: r117297 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/arith.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8f2e3c34f4d..0bfc8d04c38 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2006-09-28 Steven G. Kargl + + fortran/29147 + * arith.c (gfc_check_integer_range): Disable range checking via + -fno-range-check. + 2006-09-28 Steven G. Kargl * arith.c: Change conditional test for inclusion of arctangent(). diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 086ec4dbb38..b473fdb15ee 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -351,6 +351,10 @@ gfc_check_integer_range (mpz_t p, int kind) result = ARITH_ASYMMETRIC; } + + if (gfc_option.flag_range_check == 0) + return result; + if (mpz_cmp (p, gfc_integer_kinds[i].min_int) < 0 || mpz_cmp (p, gfc_integer_kinds[i].huge) > 0) result = ARITH_OVERFLOW;