diff options
author | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-29 04:51:53 +0000 |
---|---|---|
committer | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-29 04:51:53 +0000 |
commit | fc4a9273d580b8ed8519c3349130a73bda16c5b9 (patch) | |
tree | 92c09263e16b9b47750d977cee8e6b1d0c203b53 /gcc | |
parent | 23e97733b97b0b225c0eaddf88717f9d48d7cf77 (diff) | |
download | gcc-fc4a9273d580b8ed8519c3349130a73bda16c5b9.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117297 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/arith.c | 4 |
2 files changed, 10 insertions, 0 deletions
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 <kargl@gcc.gnu.org> + + fortran/29147 + * arith.c (gfc_check_integer_range): Disable range checking via + -fno-range-check. + 2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org> * 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; |