diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-01-03 19:49:38 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-01-03 19:49:38 +0000 |
commit | 9370b3c0f9f6d4e3ad3864ae77eac0a353aa41ff (patch) | |
tree | 407a1075cdef9fa8b447f85bf9e754483cb358c1 /libgfortran/io/unix.c | |
parent | 33ae48375f1ceba18d2fe42d10acdf7a6b8acaba (diff) | |
download | gcc-9370b3c0f9f6d4e3ad3864ae77eac0a353aa41ff.zip gcc-9370b3c0f9f6d4e3ad3864ae77eac0a353aa41ff.tar.gz gcc-9370b3c0f9f6d4e3ad3864ae77eac0a353aa41ff.tar.bz2 |
re PR fortran/34565 (internal write to string array fails)
2008-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34565
* io/io.h: Adjust protoypes for open_internal(),
next_array_record() and init_loop_spec().
* io/list_read.c (next_char): Use argument "finished"
of next_array_record to check for end on internal file.
* io/unit.c: Calculate the offset for an array
internal file and supply this informatin to open_internal().
* io/unix.c (open_internal): Set the offset for the internal
file on open.
* io/transfer.c (init_loop_spec): Calculate the starting
record in case of negative strides. Return size of 0 for
an empty array.
(next_array_record): Use an extra flag to signal that the
array is finished.
(next_record_r): Use the new flag to next_array_record().
(next_record_w): Likewise.
2008-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34565
* gfortran.dg/internal_readwrite_1.f90: New test.
* gfortran.dg/internal_readwrite_2.f90: New test.
From-SVN: r131305
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 93484ea..91d5adb 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1078,7 +1078,7 @@ empty_internal_buffer(stream *strm) /* open_internal()-- Returns a stream structure from an internal file */ stream * -open_internal (char *base, int length) +open_internal (char *base, int length, gfc_offset offset) { int_stream *s; @@ -1086,7 +1086,7 @@ open_internal (char *base, int length) memset (s, '\0', sizeof (int_stream)); s->buffer = base; - s->buffer_offset = 0; + s->buffer_offset = offset; s->logical_offset = 0; s->active = s->file_length = length; |