[Bug fortran/58324] Bogus END-of-line error with list-directed I/O of file without trailing sequential record marker
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 15 23:07:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58324
--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Sat Mar 15 23:06:44 2014
New Revision: 208599
URL: http://gcc.gnu.org/viewcvs?rev=208599&root=gcc&view=rev
Log:
2014-03-15 Jerry DeLisle <jvdelisle@gcc.gnu>
Backport from mainline
PR libfortran/58324
PR libfortran/38199
* intrinsics/string_intriniscs_inc.c (string_len_trim):
Remove prototypes for string_len_trim and move to...
* libgfortran.h (string_len_trim): ... here and
(string_len_trim_char4): ...here.
* io/list_read.c (finish_list_read): Read one character to check
for the end of the file. If it is the end, then issue the file
end error message. If not, use eat_line to reach the end
without giving error. The next attempt to read will then
issue the error as described above.
* io/read.c (read_decimal): Quickly skip spaces to avoid calls
to next_char.
* io/unit.c (is_trim_ok): New helper function to check various
conditions to see if its OK to trim the internal unit string.
(get_internal_unit): Use LEN_TRIM to shorten selected internal
unit strings for optimizing READ. Enable this optimization for
formatted READ.
Backport from mainline
PR libfortran/58324
* gfortran.dg/list_read_12.f90: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/list_read_12.f90
Modified:
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/libgfortran/ChangeLog
branches/gcc-4_7-branch/libgfortran/intrinsics/string_intrinsics_inc.c
branches/gcc-4_7-branch/libgfortran/io/list_read.c
branches/gcc-4_7-branch/libgfortran/io/read.c
branches/gcc-4_7-branch/libgfortran/io/unit.c
branches/gcc-4_7-branch/libgfortran/libgfortran.h
More information about the Gcc-bugs
mailing list