OSDN Git Service

2014-03-15 Jerry DeLisle <jvdelisle@gcc.gnu>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Mar 2014 23:06:44 +0000 (23:06 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Mar 2014 23:06:44 +0000 (23:06 +0000)
commit5c59a3c4ad5f661bda400fcea1cd44bc306c12e0
treec980b930a4829549225a02d1199b1f530ecff18d
parent3c6f3884b127e4c622c8d115c3fc9d50982e979a
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@208599 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/list_read_12.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/intrinsics/string_intrinsics_inc.c
libgfortran/io/list_read.c
libgfortran/io/read.c
libgfortran/io/unit.c
libgfortran/libgfortran.h