aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/arith.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2006-09-29 04:51:53 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2006-09-29 04:51:53 +0000
commita40e443fe8ce40cabbedbe4d134a3e7d397ea089 (patch)
tree92c09263e16b9b47750d977cee8e6b1d0c203b53 /gcc/fortran/arith.c
parent67796c1fc2f5fa0e7abcb4083d1f377c9d017a48 (diff)
downloadgcc-a40e443fe8ce40cabbedbe4d134a3e7d397ea089.zip
gcc-a40e443fe8ce40cabbedbe4d134a3e7d397ea089.tar.gz
gcc-a40e443fe8ce40cabbedbe4d134a3e7d397ea089.tar.bz2
arith.c (gfc_check_integer_range): Disable range checking via -fno-range-check.
2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org> fortran/29147 * arith.c (gfc_check_integer_range): Disable range checking via -fno-range-check. From-SVN: r117297
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r--gcc/fortran/arith.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 086ec4d..b473fdb 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;