aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
AgeCommit message (Collapse)AuthorFilesLines
2007-04-06re PR fortran/31395 ([4.2 Only] Colon edit descriptor is ignored unless ↵Jerry DeLisle1-5/+2
preceded by a comma or a slash) 2007-04-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31395 * io/format.c (parse_format_list): Fix parsing. From-SVN: r123620
2007-04-01re PR libfortran/31052 ([4.2 only] Bad IOSTAT values when readings NAMELISTs ↵Jerry DeLisle3-29/+3
past EOF) 2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31052 * io/open.c (test_endfile): Delete this function. (edit_modes): Delete call to test_endfile. (new_unit): Likewise. * io/io.h: Delete prototype for test_endfile. * io/transfer.c (next_record_r): Remove use of test_endfile. (st_read): Add test for end file condition and adjust status. From-SVN: r123403
2007-04-01re PR fortran/31366 ([4.2 only] Last record truncated for read after short ↵Jerry DeLisle2-1/+24
write, direct access file) 2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31366 * io/transfer.c (read_block_direct): Do not generate error when reading past EOF on a short record that is less than the RECL= specified. 2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31207 * io/unit.c (close_unit_1): If there are bytes previously written from ADVANCE="no", move to the end before closing. From-SVN: r123401
2007-03-28re PR libfortran/31052 ([4.2 only] Bad IOSTAT values when readings NAMELISTs ↵Jerry DeLisle1-1/+2
past EOF) 2007-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31052 * io/transfer.c (next_record_r): Do not call test_endfile if in namelist mode. From-SVN: r123284
2007-03-26re PR fortran/31199 (write with "t1" + nonadvancing transfer format gives ↵Jerry DeLisle3-2/+14
wrong output) 2007-03-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31199 *io/io.h: Add saved_pos to gfc_unit structure. *io/open.c (new_unit): Initialize saved_pos. *io/transfer.c (data_transfer_init): Set max_pos to value in saved_pos. (next_record_w): Fix whitespace. (finalze_transfer): Calculate max_pos for ADVANCE="no" and save it for later use. If not ADVANCE="no" set saved_pos to zero. From-SVN: r123205
2007-03-23re PR libfortran/31052 ([4.2 only] Bad IOSTAT values when readings NAMELISTs ↵Jerry DeLisle5-5/+36
past EOF) 2007-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31052 * file_pos.c: Update Copyright year. * io/open.c (test_endfile): Restore test_endfile to fix SPEC regression. Update Copyright year. * io/io.h: Same. * io/unix.c (is_special): Add missing type for this function. Update Copyright year. * io/transfer.c (next_record_r): Restore test_endfile. (st_read): Fix whitespace. Update Copyright year From-SVN: r123139
2007-03-18re PR libfortran/31052 ([4.2 only] Bad IOSTAT values when readings NAMELISTs ↵Jerry DeLisle5-37/+31
past EOF) 2007-03-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31052 * io/file_position (st_rewind): Fix comments. Remove use of test_endfile. Don't seek if already at 0 position. Use new is_special function to set endfile state. * io/open.c (test_endfile): Delete this function. * io/io.h: Delete prototype for test_endfile. Add prototype for is_special. * io/unix.c (is_special): New function. Fix whitespace. * io/transfer.c (next_record_r): Remove use of test_endfile. From-SVN: r123038
2007-03-16re PR libfortran/31099 (Runtime error on legal code using RECL)Jerry DeLisle1-1/+0
2007-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31099 * io/file_pos.c (st_rewind): Don't set bytes_left to zero. From-SVN: r122970
2007-03-15re PR fortran/31051 ([4.2 Only] gfortran bug with x and t format descriptors.)Jerry DeLisle1-3/+8
2007-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31051 * io/transfer.c (formatted_transfer_scalar): Adjust position for pending spaces when in writing mode. Clean up some formatting. From-SVN: r122940
2007-03-14unix.c (regular_file): For ACTION_UNSPECIFIED retry with O_RDONLY even if ↵Jakub Jelinek1-3/+3
errno is EROFS. * io/unix.c (regular_file): For ACTION_UNSPECIFIED retry with O_RDONLY even if errno is EROFS. From-SVN: r122914
2007-03-09re PR libfortran/31099 (Runtime error on legal code using RECL)Jerry DeLisle2-4/+7
2007-03-09 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/31099 * io/open.c (new_unit): Initialize bytes_left and recl_subrecord. * io/transfer.c (next_record_w): Set bytes left to record length for sequential unformatted I/O. (next_record_r): Ditto. (read_block_direct): Fix test for exceeding bytes_left. From-SVN: r122763
2007-02-25re PR libfortran/30918 (Failure to skip commented out NAMELIST)Jerry DeLisle1-0/+4
2007-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/30918 * io/listread.c (namelist_read): Eat comment line. From-SVN: r122307
2007-02-23re PR fortran/30910 ([Regression 4.2, 4.3] Gfortran: ES format not quite ↵Jerry DeLisle1-1/+1
right...) 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/30910 * io/write.c (output_float): Add condition of format F only for special case rounding with zero precision. From-SVN: r122250
2007-02-02re PR fortran/30284 ([4.1 only] ICE in gfc_add_modify with internal reads)Paul Thomas1-2/+3
2007-02-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/30284 PR fortran/30626 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute from function and make sure that substring lengths are translated. (is_aliased_array): Remove static attribute. * trans.c : Add prototypes for gfc_conv_aliased_arg and is_aliased_array. * trans-io.c (set_internal_unit): Add the post block to the arguments of the function. Use is_aliased_array to check if temporary is needed; if so call gfc_conv_aliased_arg. (build_dt): Pass the post block to set_internal_unit and add to the block after all io activiy is done. 2007-02-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/30284 PR fortran/30626 * io/transfer.c (init_loop_spec, next_array_record): Change to lbound rather than unity base. 2007-02-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/30284 * gfortran.dg/arrayio_11.f90.f90: New test. PR fortran/30626 * gfortran.dg/arrayio_12.f90.f90: New test. From-SVN: r121500
2007-01-18re PR libfortran/29649 (Force core dump on runtime library errors)Francois-Xavier Coudert1-9/+0
2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr> Tobias Burnus <burnus@net-b.de> PR libfortran/29649 * gfortran.h (gfc_option_t): Add flag_dump_core. * lang.opt: Add -fdump-core option. * invoke.texi: Document the new options. * trans-decl.c (gfc_build_builtin_function_decls): Add new options to the call to set_std. * options.c (gfc_init_options, gfc_handle_option): Set the new options. 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr> Tobias Burnus <burnus@net-b.de> PR libfortran/29649 * runtime/environ.c (variable_table): New GFORTRAN_ERROR_DUMPCORE environment variable. * runtime/compile_options.c (set_std): Add new argument. * runtime/error.c (sys_exit): Move from io/unix.c. Add coredump functionality. * libgfortran.h (options_t): New dump_core and backtrace members. (sys_exit): Move prototype. * io/unix.c (sys_exit): Move to runtime/error.c. * configure.ac: Add check for getrlimit. * configure: Regenerate. Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r120897
2007-01-17re PR libfortran/27107 (Make dependency on io/io.h broken)Francois-Xavier Coudert4-122/+502
PR libfortran/27107 * runtime/environ.c: Don't include io/io.h. * runtime/string.c: Don't include io/io.h. (compare0): Add cast to avoid warning. * runtime/error.c: Don't include io/io.h. (st_printf): Move to io/unix.c. * intrinsics/flush.c: Delete, contents moved to io/intrinsics.c. * intrinsics/fget.c: Likewise. * intrinsics/ftell.c: Likewise. * intrinsics/tty.c: Likewise. * libgfortran.h (DEFAULT_RECL, notification_std, get_unformatted_convert, IOPARM_*, st_parameter_common, unit_convert, DEFAULT_TEMPDIR): New declarations. * io/io.h (DEFAULT_RECL, notification_std, get_unformatted_convert, IOPARM_*, st_parameter_common, unit_convert, DEFAULT_TEMPDIR): Move to libgfortran.h. * io/unix.c: Add io/unix.h content. (st_printf): New function. * io/intrinsics.c: New file. * io/unix.h: Remove, contents moved into unix.c. * libtool-version: Update library version to 3.0.0. * configure.ac: Update library version to 0.3. * Makefile.am (intrinsics/fget.c, intrinsics/flush.c, intrinsics/ftell.c, intrinsics/tty.c, libgfortran.h): Remove targets. * Makefile.in: Regenerate. * configure: Regenerate. From-SVN: r120869
2007-01-12re PR fortran/30435 (Slash at end of input not recognized according to standard)Jerry DeLisle1-6/+8
2007-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/30435 * io/list_read.c (finish_separator): Don't call next_record. (list_formatted_read_scalar): Clean up some comments and whitespace. (nml_read_obj): Whitespace fix. From-SVN: r120737
2007-01-06re PR libfortran/30162 (Document when sequential I/O with named pipes works)Jerry DeLisle1-11/+28
2007-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/30162 * io/unix.c (fd_flush): Don't seek if file is not seekable, defined as s->file_length == -1. (fd_alloc_w_at): Do not adjust file_length if file is not seekable. (fd_seek): If not seekable, just return success. (fd_truncate): If not seekable, no need to truncate. Return failure if seek fails and the stream is not a pipe. (fd_to_stream): Make test for non-seekable file more robust. From-SVN: r120512
2006-12-28re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4)Jerry DeLisle2-3/+3
2006-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/30014 *io/io.h (st_parameter_dt): Change *size and *iolength type to GFC_IO_INT. *io/transfer.c (finalize_transfer): Cast dtp->u.p.size_used to GFC_IO_INT. (iolength_transfer): Cast size * nelems to GFC_IO_INT. From-SVN: r120234
2006-12-15re PR fortran/30145 (Fortran 90: write statement fails to ignore zero-sized ↵Jerry DeLisle1-1/+1
array...) 2006-12-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/30145 * io/transfer.c (transfer_array): Check for negative extent. From-SVN: r119942
2006-12-06re PR libfortran/30009 ([4.1 only] Unformatted reads exceeding storage units ↵Thomas Koenig1-32/+26
gives EOF instead of ERR) 2006-12-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30009 PR libfortran/30056 * gfortran.dg/read_eof_4.f90: Add tests. * gfortran.dg/readwrite_unf_direct_eor_1.f90: New test. * gfortran.dg/unf_read_corrupted_1.f90: New test. 2006-12-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30009 PR libfortran/30056 * libgfortran.h: Add ERROR_CORRUPT_FILE to error_codes. * runtime/error.c (translate_error): Add handling for ERROR_CORRUPT_FILE. * io/transfer.c (read_block_direct): Add comment about EOR for stream files. Remove test for no bytes left for direct access files. Generate an ERROR_SHORT_RECORD if the read was short. For unformatted sequential files: Check endfile condition. Remove test for no bytes left. End of file here means that the file structure has been corrupted. Pre-position the file for the next record in case of error. (write_buf): Whitespace fix. Subtract the number of bytes written from bytes_left. From-SVN: r119592
2006-12-05re PR libfortran/30005 (Open errors (not/already exists etc.): show also the ↵Jerry DeLisle1-1/+29
file name) 2006-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/30005 * io/open.c: Add errno.h include. (new_unit): Add new error messages with file name for file open. From-SVN: r119530
2006-12-01re PR libfortran/29568 (implement unformatted files with subrecords (Intel ↵Thomas Koenig4-235/+482
style)) 2006-12-01 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/29568 * gfortran.dg/convert_implied_open.f90: Change to new default record length. * gfortran.dg/unf_short_record_1.f90: Adapt to new error message. * gfortran.dg/unformatted_subrecords_1.f90: New test. 2006-12-01 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/29568 * gfortran.h (gfc_option_t): Add max_subrecord_length. (top level): Define MAX_SUBRECORD_LENGTH. * lang.opt: Add option -fmax-subrecord-length=. * trans-decl.c: Add new function set_max_subrecord_length. (gfc_generate_function_code): If we are within the main program and max_subrecord_length has been set, call set_max_subrecord_length. * options.c (gfc_init_options): Add defaults for max_subrecord_lenght, convert and record_marker. (gfc_handle_option): Add handling for -fmax_subrecord_length. * invoke.texi: Document the new default for -frecord-marker=<n>. 2006-12-01 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/29568 * libgfortran/libgfortran.h (compile_options_t): Add record_marker. (top level): Define GFC_MAX_SUBRECORD_LENGTH. * runtime/compile_options.c (set_record_marker): Change default to four-byte record marker. (set_max_subrecord_length): New function. * runtime/error.c (translate_error): Change error message for short record on unformatted read. * io/io.h (gfc_unit): Add recl_subrecord, bytes_left_subrecord and continued. * io/file_pos.c (unformatted_backspace): Change default of record marker size to four bytes. Loop over subrecords. * io/open.c: Default recl is max_offset. If compile_options.max_subrecord_length has been set, set set u->recl_subrecord to its value, to the maximum value otherwise. * io/transfer.c (top level): Add prototypes for us_read, us_write, next_record_r_unf and next_record_w_unf. (read_block_direct): Separate codepaths for unformatted direct and unformatted sequential. If a recl has been set by the user, use the number of bytes left for the record if it is smaller than the read request. Loop over subrecords. Set an error if the user has set a recl and the read was short. (write_buf): Separate codepaths for unformatted direct and unformatted sequential. If a recl has been set by the user, use the number of bytes left for the record if it is smaller than the read request. Loop over subrecords. Set an error if the user has set a recl and the read was short. (us_read): Add parameter continued (to indicate that bytes_left should not be intialized). Change default of record marker size to four bytes. Use subrecord. If the subrecord length is smaller than zero, this indicates a continuation. (us_write): Add parameter continued (to indicate that the continued flag should be set). Use subrecord. (pre_position): Use 0 for continued on us_write and us_read calls. (skip_record): New function. (next_record_r_unf): New function. (next_record_r): Use next_record_r_unf. (write_us_marker): Default size for record markers is four bytes. (next_record_w_unf): New function. (next_record_w): Use next_record_w_unf. From-SVN: r119412
2006-11-22io.h (unit_flags): Add new flag has_recl.Jerry DeLisle3-5/+11
2006-11-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> * io/io.h (unit_flags): Add new flag has_recl. * io.open.c (new_unit): Set flag if RECL= was specified. * io/transfer.c (us_write): If flag set, leave recl as initialized by new_unit. From-SVN: r119087
2006-11-16trans-decl.c (gfc_get_symbol_decl): Fix formatting.François-Xavier Coudert1-1/+1
* trans-decl.c (gfc_get_symbol_decl): Fix formatting. * io/open.c (new_unit): Format %d expects an int variable. * runtime/error.c (show_locus): Format %d expects an int variable. From-SVN: r118887
2006-11-092006-11-08 Steven G. Kargl <kargl@gcc.gnu.org> Steven G. Kargl1-0/+2
* io/read. (max_value): Hide "int n" in an #ifdef. From-SVN: r118613
2006-11-09re PR fortran/29752 (write(*,*,advance='NO'), READ(): Data not flushed)Jerry DeLisle1-3/+6
2006-11-08 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29752 * io/transfer.c (finalize_transfer): Flush on ADVANCE_NO. From-SVN: r118611
2006-11-05transfer.c (next_record_w): Fix indentation.Jerry DeLisle1-1/+1
2006-11-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> * io/transfer.c (next_record_w): Fix indentation. From-SVN: r118508
2006-11-05re PR libfortran/25545 (internal file and dollar edit descriptor)Jerry DeLisle1-113/+90
2006-11-04 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/25545 * io/transfer.c (write_block): Cleanup code paths between stream and non-stream I/O. (write_buf): Cleanup. (read_block): Cleanup. (finalize_transfer): Call next_record for '$' edit descriptor handling of internal unit. Cleanup code for readability. From-SVN: r118506
2006-10-31re PR libfortran/29627 ([4.1 only] partial unformatted reads shouldn't succeed)Thomas Koenig1-49/+41
2006-10-31 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/29627 * libgfortran.h: Add ERROR_SHORT_RECORD * runtime/error.c (translate_error): Add case for ERROR_SHORT_RECORD. * io/transfer.c (read_block_direct): Separate codepaths for stream and record unformatted I/O. Remove unneeded tests for standard input, padding and formatted I/O. If the record is short, read in as much data as possible, then raise the error. 2006-10-31 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/29627 * gfortran.dg/unf_short_record_1.f90: New test. From-SVN: r118341
2006-10-28re PR fortran/29625 (Octal edit descriptors allow real variables, even with ↵Tobias Burnus1-2/+12
-std=f95) 2006-10-28 Tobias Burnus <burnus@net-b.de> PR fortran/29625 * io/transfer.c (formatted_transfer_scalar): Allow binary edit descriptors for real variables; give error for BOZ edit descriptor for non-integers when using -std=f*. From-SVN: r118111
2006-10-26re PR fortran/29563 (Internal read loses data.)Jerry DeLisle1-1/+2
2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/list_read.c (next_char): Fix an error in previous commit. From-SVN: r118063
2006-10-26re PR fortran/29563 (Internal read loses data.)Jerry DeLisle3-16/+29
2006-10-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/io.h (st_parameter_dt): Add new flag at_eof. * io/list_read.c (next_char): Set flag when EOF and return '\n' to signal EOR. Check flag on next call and jump out. * io/unit.c (get_internal_unit): Initialize new flag. From-SVN: r118059
2006-10-18re PR fortran/29277 (Formated stream output: Translate "\n" / achar(10) into ↵Jerry DeLisle1-7/+68
"\r\n" on some platforms) 2006-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29277 * io/write.c (write_a): Add conversion of LF to CR-LF for systems with #define HAVE_CRLF. From-SVN: r117866
2006-10-18in_pack.m4: Fixed a typo.Tobias Burnus5-7/+7
2006-10-16 Tobias Burnus <burnus@net-b.de> * m4/in_pack.m4: Fixed a typo. * m4/iforeach.m4: Fixed a typo. * m4/eoshift1.m4: Fixed a typo. * m4/eoshift3.m4: Fixed a typo. * m4/cshift1.m4: Fixed a typo. * m4/in_unpack.m4: Fixed a typo. * m4/reshape.m4: Fixed a typo. * m4/ifunction.m4: Fixed a typo. * runtime/environ.c: Fixed a typo. * runtime/in_pack_generic.c: Fixed a typo. * runtime/in_unpack_generic.c: Fixed a typo. * runtime/memory.c: Fixed a typo. * intrinsics/cshift0.c: Fixed a typo. * intrinsics/cpu_time.c: Fixed a typo. * intrinsics/pack_generic.c: Fixed a typo. * intrinsics/unpack_generic.c: Fixed a typo. * intrinsics/eoshift0.c: Fixed a typo. * intrinsics/eoshift2.c: Fixed a typo. * intrinsics/reshape_generic.c: Fixed a typo. * io/open.c: Fixed a typo. * io/list_read.c: Fixed a typo. * io/io.h: Fixed a typo. * io/transfer.c: Fixed a typo. * io/write.c: Fixed a typo. From-SVN: r117857
2006-10-18re PR fortran/29277 (Formated stream output: Translate "\n" / achar(10) into ↵Jerry DeLisle2-26/+42
"\r\n" on some platforms) 2006-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29277 * io/list_read.c (next_char): Update strm_pos. (eat_separator): Delete extra call to unget_char. * io/transfer.c (read_block): Use read_sf for formatted stream I/O. (next_record_r): Update strm_pos for formatted stream I/O and handle end-of-record correctly. (next_record_w): Ditto. (next_record): Enable next record (r/w) functions and update strm_pos. (finalize_transfer): Call next_record to finish the record. From-SVN: r117846
2006-09-23re PR libfortran/27964 (Wrong line ends on windows (XP))Danny Smith1-0/+6
PR libfortran/27964 * configure.ac: Check for setmode() function. * configure: Regenerate. * config.h.in: Regenerate. * io/unix.c (output_stream): Force stdout to binary mode. (error_stream): Force stderr to binary mode. From-SVN: r117166
2006-09-15re PR fortran/29053 (Consecutive STREAM I/O file positions mixed up)Jerry DeLisle6-23/+28
2006-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29053 * io.h (gfc_unit): Add variable, strm_pos, to track STREAM I/O file position. * file_pos.c (st_rewind): Set strm_pos to beginning. * open.c (new_unit): Initialize strm_pos. * read.c (read_x): Bump strm_pos. * inquire.c (inquire_via_unit): Return strm_pos value. * transfer.c (read_block),(read_block_direct),(write_block) (write_buf): Seek to strm_pos - 1. Update strm_pos when done. (pre_position): Initialize strm_pos. (data_transfer_init): Set strm_pos if DT_HAS_REC. (finalize_transfer): Flush file, no need to update strm_pos. From-SVN: r116970
2006-08-28re PR libfortran/28354 ([4.1 Only] 0.99999 printed as 0. instead of 1. by ↵Jerry DeLisle1-0/+9
format(f3.0)) 2006-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28354 * io/write.c: Check for special case of zero precision in format and pre-round the real value. From-SVN: r116502
2006-08-15re PR fortran/25828 ([f2003] ACCESS='STREAM' io support)Jerry DeLisle7-152/+303
2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/25828 * libgfortran.h: Rename GFC_LARGE_IO_INT to GFC_IO_INT. * io/file_pos.c (st_backspace): Ignore if access=STREAM. (st_rewind): Handle case of access=STREAM. * io/open.c (access_opt): Add STREAM_ACCESS. (edit_modes): Set current_record to zero only if not STREAM. (new_unit): Initialize maxrec, recl, and last_record for STREAM. * io/read.c (read_x): Advance file position for STREAM. * io/io.h (enum unit_access): Align IOPARM flags with frontend. Add ACCESS_STREAM. Add prototype for is_stream_io () function. Use GFC_IO_INT. * io/inquire.c (inquire_via_unit): Add text for access = "STREAM". * io/unit.c (is_stream_io): New function to return true if access = STREAM. * io/transfer.c (file_mode): Add modes for unformatted stream and formatted stream. (current_mode): Return appropriate file mode based on access flags. (read_block): Handle formatted stream reads. (read_block_direct): Handle unformatted stream reads. (write_block): Handle formatted stream writes. (write_buf): Handle unformatted stream writes. (unformatted_read): Fix up, use temporary for size. (pre_position): Position file for STREAM access. (data_transfer_init): Initialize for stream access, skip irrelevent error checks. (next_record_r),(next_record_w), and (next_record): Do nothing for stream I/O. (finalize_transfer): Flush when all done if stream I/O. From-SVN: r116172
2006-07-31re PR fortran/28335 (flush() / write() statement on closed units - error?)Jerry DeLisle1-1/+4
2006-07-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28335 * file_position.c (st_flush): Add clearer error when UNIT does not exist. Add reference to standard in comment. From-SVN: r115835
2006-07-31re PR fortran/28335 (flush() / write() statement on closed units - error?)Jerry DeLisle2-6/+3
2006-07-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28335 * close.c (st_close): Revert previous patch and add comment. * file_position.c (st_flush): Revert previous patch and add comment. From-SVN: r115829
2006-07-30transfer.c (transfer_array): Remove stride0 fix.Janne Blomqvist1-3/+0
2006-07-30 Janne Blomqvist <jb@gcc.gnu.org> * io/transfer.c (transfer_array): Remove stride0 fix. From-SVN: r115818
2006-07-262006-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>Jerry DeLisle2-1/+6
PR libgfortran/258335 * close.c (st_close): Add error when UNIT does not exist. * file_position.c (st_flush): Add error when UNIT does not exist. From-SVN: r115749
2006-07-24re PR libfortran/25289 (Cannot handle record numbers large than huge(0_4))Jerry DeLisle1-1/+1
2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/25289 * libgfortran.h: Add conditional definition of GFC_LARGE_IO_INT type. * io/io.h (st_parameter_dt): Define rec as type GFC_LARGE_IO_INT. From-SVN: r115698
2006-07-22re PR fortran/28339 (gfortran misses a record from a format statement)Jerry DeLisle2-4/+10
2006-07-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28339 * io/transfer.c (next_record_w): Use next_array_record result to set END_FILE. (write_block): Test for END_FILE before the next write occurs. * io/unit.c (get_internal_unit): Initialize iunit->endfile for internal unit. From-SVN: r115670
2006-07-04re PR libfortran/27704 (Incorrect runtime error on multiple OPEN)Jerry DeLisle5-14/+14
2006-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/27704 * runtime/error.c (notify_std): Pass common flags into function. Use flags to show locus of error or warning. * libgfortran.h: Add enum try. Add prototype for notify_std. * io/open.c (edit_modes): Allow status="old" and add extension to allow status="scratch" *io/list_read.c (nml_read_obj): Update call to notify_std. *io/io.h: Remove enum try and prototype for notify_std. *io/transfer.c (read_sf): Update call to notify_std. *io/format.c (parse_format_list): Update call to notify_std. From-SVN: r115168
2006-06-25io.h: Move proto for unit_to_fd...Francois-Xavier Coudert1-3/+0
* io/io.h: Move proto for unit_to_fd... * libgfortran.h: ...here. From-SVN: r114983
2006-06-19re PR libgomp/27254 (FAIL: libgomp.fortran/reduction6.f90)John David Anglin1-0/+9
PR libgomp/27254 * io/unit.c (get_internal_unit): Initialize and lock thread mutex for internal units. From-SVN: r114765
2006-05-29re PR libfortran/27757 (Problems with direct access io)Jerry DeLisle1-0/+1
2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/27757 * io/unix.c (fd_seek): Set active to zero. From-SVN: r114220