This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52428] [RFC] I/O: READING of "-huge()-1": Integer overflow
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 May 2012 19:39:27 +0000
- Subject: [Bug fortran/52428] [RFC] I/O: READING of "-huge()-1": Integer overflow
- Auto-submitted: auto-generated
- References: <bug-52428-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52428
--- Comment #9 from Janne Blomqvist <jb at gcc dot gnu.org> 2012-05-14 19:39:27 UTC ---
Author: jb
Date: Mon May 14 19:39:23 2012
New Revision: 187478
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187478
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/int_range_io_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.texi
trunk/gcc/fortran/invoke.texi
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/io.h
trunk/libgfortran/io/list_read.c
trunk/libgfortran/io/read.c
trunk/libgfortran/libgfortran.h
trunk/libgfortran/runtime/compile_options.c