summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-14 19:39:23 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-14 19:39:23 +0000
commit7f4f15dc761b8c76f3945354b6069daa7c63b4a8 (patch)
tree1b4a3a8d4b65ec8d0a88de4f00b90d28ce493090 /libgfortran/runtime
parent5dc7473db4e0ec618caae0858c1ccbb395b06213 (diff)
downloadgcc-7f4f15dc761b8c76f3945354b6069daa7c63b4a8.tar.gz
PR 52428 Range checking when reading integer values.
gcc/fortran ChangeLog: 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/52428 * gfortran.texi: Update _gfortran_set_options documentation. * invoke.texi: Remove runtime behavior description of -fno-range-check. * trans-decl.c (create_main_function): Don't pass the range-check setting to the library. libgfortran ChangeLog: 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/52428 * io/io.h (max_value): Rename to si_max, remove second argument. * io/list_read.c (convert_integer): Use unsigned types when parsing the digits, set max value depending on the sign. * io/read.c (max_value): Rename to si_max, remove second argument, simplify. (read_decimal): Set max value depending on sign, always check overflow. (read_radix): Calculate max unsigned value directly. * libgfortran.h (struct compile_options_t): Remove range_check field. * runtime/compile_options.c (set_options): Skip handling options[7]. (init_compile_options): Don't set removed field. gcc/testsuite ChangeLog: 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/52428 * gfortran.dg/int_range_io_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/compile_options.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c
index 0e657f73ba6..2ba1aedf5c5 100644
--- a/libgfortran/runtime/compile_options.c
+++ b/libgfortran/runtime/compile_options.c
@@ -169,8 +169,10 @@ set_options (int num, int options[])
compile_options.sign_zero = options[5];
if (num >= 7)
compile_options.bounds_check = options[6];
- if (num >= 8)
- compile_options.range_check = options[7];
+ /* options[7] is the -frange-check option, which no longer affects
+ the library behavior; range checking is now always done when
+ parsing integers. It's place in the options array is retained due
+ to ABI compatibility. Remove when bumping the library ABI. */
/* If backtrace is required, we set signal handlers on the POSIX
2001 signals with core action. */
@@ -223,7 +225,6 @@ init_compile_options (void)
compile_options.pedantic = 0;
compile_options.backtrace = 0;
compile_options.sign_zero = 1;
- compile_options.range_check = 1;
}
/* Function called by the front-end to tell us the