aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
AgeCommit message (Collapse)AuthorFilesLines
2004-11-10re PR fortran/18218 (Miscompare in sixtrack benchmark caused by loss of ↵Paul Brook1-154/+85
precision) PR fortran/18218 * configure.ac: Check for strtof. * configure: Regenerate. * config.h.in: Regenerate. * io/read.c (convert_real): Use strtof if available. (convert_precision_real): Remove. (read_f): Avoid poor exponentiation algorithm. gcc/testsuite/ * gfortran.dg/list_read.c: New test. From-SVN: r90382
2004-10-30config.h.in: Regenerate.Aaron W. LaFramboise1-3/+34
2004-10-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com> * config.h.in: Regenerate. * configure: Regenerate. * configure.ac (AC_CHECK_FUNCS): Add mkstemp. * io/unix.c (S_IRGRP): Define if undefined. (S_IWGRP): Same. (S_IROTH): Same. (S_IWOTH): Same. (tempfile): Use mktemp if mkstemp missing, fix typos. From-SVN: r89893
2004-10-30Missing bit of previous patch.Aaron W. LaFramboise1-0/+1
2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com> * unix.c: Include stdio.h. From-SVN: r89892
2004-10-07transfer.c (finalize_transfer): Free internal streams.Paul Brook2-1/+6
* io/transfer.c (finalize_transfer): Free internal streams. * io/unix.c (mem_close): Free stream object. From-SVN: r88709
2004-10-06re PR libfortran/17709 (NULL I/O list and Format error.)Paul Brook1-0/+1
PR libfortran/17709 * io/transfer.c (data_transfer_init): Reset sf_seen_eor. testsuite/ * gfortran.dg/empty_format_1.f90: New test. From-SVN: r88615
2004-10-04re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)Paul Brook2-2/+16
2004-10-04 Paul Brook <paul@codesourcery.com> Bud Davis <bdavis9659@comcast.net> PR fortran/17706 PR fortran/16434 * io/format.c (parse_format_list): Set repeat count for S, SP, SS, BN and BZ formats. * io/write.c (output_float): Don't output minus zero. libgfortran/ * gfortran/pr17706.f90: New test. * gfortran.dg/g77/f77-edit-s-out.f: Remove xfail. Actually apply the patch this time. From-SVN: r88513
2004-10-03abort.c ("libgfortran.h"): Move.Aaron W. LaFramboise1-2/+2
2004-10-03 Aaron W. LaFramboise <aaronavay62@aaronwl.com> * intrinsics/abort.c ("libgfortran.h"): Move. * intrinsics/date_and_time.c ("libgfortran.h"): Same. * intrinsics/write.c ("libgfortran.h"): Same. From-SVN: r88444
2004-09-21re PR libfortran/17286 (namelist containing more than one value cannot ↵Bud Davis1-0/+4
contain whitespace or newlines for READ) 2004-09-21 Bud Davis <bdavis9659@comcast.net> PR fortran/17286 * io/list_read.c (namelist_read): ignore spaces after the '=' for namelist reads. 2004-09-21 Bud Davis <bdavis9659@comcast.net> PR fortran/17286 * gfortran.dg/pr17286.f90: New test. From-SVN: r87799
2004-09-18config.h.in: Regenerate.Aaron W. LaFramboise1-0/+10
2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com> * config.h.in: Regenerate. * configure: Regenerate. * configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h. * unix.c: Include stdio.h. (HAVE_SYS_MMAN_H): Check. (PROT_READ, PROT_WRITE): Provide default definitions. From-SVN: r87714
2004-09-14re PR libfortran/17090 (Runtime I/O error)Bud Davis1-1/+6
2004-09-13 Bud Davis <bdavis9659@comcast.net> PR fortran/17090 * io/list_read.c (list_formatted_read): Handle trailing spaces at end of line. 2004-09-13 Bud Davis <bdavis9659@comcast.net> PR fortran/17090 * gfortran.dg/pr17090.f90: New test. From-SVN: r87474
2004-09-06[multiple changes]Paul Brook1-5/+2
2004-09-06 Steven G. Kargl <kargls@comcast.net> * io/write.c (output_float): Typo in comment. Remove debugging printf. Fix format for FP of form 1e10. 2004-09-06 Paul Brook <paul@codesourcery.com> * gfortran.dg/edit_real_1.f90: Add new test. From-SVN: r87119
2004-09-02format.c (parse_format_list): Set repeat count for P descriptors.Paul Brook2-3/+13
* io/format.c (parse_format_list): Set repeat count for P descriptors. * write.c (output_float): Fix condition. Correctly handle nonzero scale factor. testsuite/ * gfortran.dg/edit_real_1.f90: Add new tests. From-SVN: r86952
2004-08-31re PR libfortran/16805 (Runtime failure using list directed read from string)Paul Brook2-5/+11
PR libfortran/16805 * io/list_read.c (next_char): Don't signal EOF for internal files. * io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads. testsuite/ 2004-08-31 Bud Davis <bdavis9659@comcast.net> * gfortran.dg/list_read_2.f90: New test. From-SVN: r86844
2004-08-31unit.c: Separate copyright years by ','.Tobias Schlüter1-11/+2
* io/unit.c: Separate copyright years by ','. (compare, insert_unit, delete_unit, is_internal_unit, close_units): Remove blank line in beginning of function. (get_unit): Simplify code. From-SVN: r86841
2004-08-31* io/unit.c (get_unit): Remove superfluous if.Paul Brook1-3/+1
From-SVN: r86838
2004-08-31transfer.c (read_sf): Rename uinty to readlen.Paul Brook2-13/+22
* io/transfer.c (read_sf): Rename uinty to readlen. Detect EOF. (finalize_transfer): Move setjmp after namlist IO. * io/unix.c (mem_alloc_r_at): Calculate remaining length correctly. testsuite/ * gfortran.dg/eof_1.f90: New test. From-SVN: r86831
2004-08-31list_read.c (eat_separator): Set at_eo when a '/' is seen.Paul Brook1-0/+1
* list_read.c (eat_separator): Set at_eo when a '/' is seen. testsuite/ * gfortran.dg/list_read_1.f90: New file. From-SVN: r86830
2004-08-31trans-decl.c, [...]: Replace all occurences of 'gfc_strlen_type_node' by ↵Tobias Schlüter2-2/+2
'gfc_charlen_type_node'. fortran/ * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'. * trans-types.h: Same. Also update comment accordingly. libgfortran/ * libgfortran.h: Replace 'gfc_strlen_type' by 'gfc_charlen_type'. Update comment accordingly. * intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c: Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'. From-SVN: r86828
2004-08-28re PR libfortran/17195 (Infinite loop in output_float in libgfortran/io/write.c)Paul Brook1-191/+315
PR libfortran/17195 * libgfortran.h (rtoa): Remove prototype. * runtime/error.c (rtoa): Remove. * io/write.c (calculate_G_format): Don't add blanks if E format is used. Add correct number of blanks when exponent width is specified. (output_float): Rewrite. testsuite/ * gfortran.dg/edit_real_1.f90: New test. From-SVN: r86701
2004-08-27Comment typo.Paul Brook1-1/+1
From-SVN: r86660
2004-08-27rewind.c (st_rewind): Reset unit to read mode.Paul Brook1-0/+5
* io/rewind.c (st_rewind): Reset unit to read mode. testsuite/ * gfortran.dg/rewind_1.f90: New test. From-SVN: r86659
2004-08-27re PR libfortran/16597 (gfortran: bug in unformatted I/O on scratch files)Bud Davis3-4/+13
2004-08-27 Bud Davis <bdavis9659@comcast.net> PR fortran/16597 * io/io.h: created typedef for unit_mode. * io/io.h (gfc_unit): added mode to unit structure. * io/transfer.c (data_transfer_init): flush if a write then read is done on a unit (direct access files). * io/rewind.c (st_rewind): Used unit mode instead of global. * gfortran.dg/pr16597.f90: New test. From-SVN: r86654
2004-08-23io.h, [...]: Fix formatting issues, update copyright years.Tobias Schlüter5-349/+346
* io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c: Fix formatting issues, update copyright years. From-SVN: r86425
2004-08-21Fix typo.Paul Brook1-1/+1
From-SVN: r86363
2004-08-21re PR libfortran/16908 (Segfault in libgfortran/io/transfer.c)Bud Davis1-4/+12
2004-08-21 Bud Davis <bdavis9659@comcast.net> PR 16908 * io/transfer.c (next_record_w): Do not blank pad. * io/transfer.c (next_record): Take into account partial records. testsuite/ * gfortran.dg/direct_io.f90: New test. From-SVN: r86361
2004-08-18re PR fortran/13278 (derived type namelist I/O support missing, causes ICE)Victor Leikehman3-14/+31
2004-08-18 Victor Leikehman <lei@il.ibm.com> PR fortran/13278 * trans-io.c (transfer_namelist_element): New. Recursively handle derived-type variables. Pass string lengths. (build_dt): Code moved to build_namelist, with some changes and additions. (gfc_build_io_library_fndecls): Declare the fifth argument in st_set_nml_var_char -- string_length. libgfortran/ * io/transfer.c (st_set_nml_var) * io/write.c (namelist_write): Allow var_name and var_name_len to be null. For strings, use string_length field instead of len. * io/io.h (struct namelist_type): New field string_length. (st_set_nml_var_char): New argument string_length. From-SVN: r86166
2004-08-13re PR libfortran/16935 (Segmentation fault of compiler with unsupported ↵Bud Davis1-2/+2
control items in OPEN) 2004-08-13 Bud Davis <bdavis9659@comcast.net> PR gfortran/13965 * gfortran.fortran-torture/execute/open_rewind.f90: New test. * io/open.c (st_open): use flags instead of the unit structure. From-SVN: r85966
2004-08-10list_read.c (namelist_read): Convert variable names to lower case, so that ↵Victor Leikehman1-3/+7
mixed-case names are recognized. 2004-08-10 Victor Leikehman <lei@il.ibm.com> * io/list_read.c (namelist_read): Convert variable names to lower case, so that mixed-case names are recognized. Don't read beyond terminating slash. From-SVN: r85751
2004-08-05Commit for Victor Leikehman <lei@il.ibm.com>Victor Leikehman1-0/+2
PR libgfortran/16704 * io/read.c (read_radix): Understand letters f and F as hex digits. From-SVN: r85596
2004-08-01write.c (write_float): Use the slightly more portable isnan in preference to ↵Roger Sayle1-1/+1
isinf. * io/write.c (write_float): Use the slightly more portable isnan in preference to isinf. From-SVN: r85407
2004-07-08re PR libfortran/16291 (F2003 formatting of Inf /Nan on irix6.5)Andreas Krebbel1-3/+3
PR fortran/16291 * libgfortran/io/write.c: (write_float): Added length check. Remove pointless memset calls. From-SVN: r84308
2004-07-05re PR libfortran/15472 (implicit open for unformatted file causes run-time ↵Bud Davis2-18/+46
error) 2004-07-04 Bud Davis <bdavis9659@comcast.net> Paul Brook <paul@codesourcery.com> PR fortran/15472 * io/transfer.c(us_write): set recl for seq unform writes to max size. * io/transfer.c(data_transfer_init): handle un-opened seq unform unit. * io/unix.c(fd_alloc_w_at): handle requests at start, fd_flush at right time. * io/unix.c(is_seekable): set based upon the file/device, not the method being used to access it (fd or mmap). * io/unix.c(fd_flush): don't set file_size if !seekable. * io/unix.c(fd_truncate: ditto. * gfortran.fortran-torture/execute/seq_io.f90: New test. Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r84104
2004-06-28re PR libfortran/12839 (incorrect IO of Inf)Bud Davis1-4/+4
2004-06-27 Bud Davis <bdavis9659@comcast.net> PR gfortran/12839 * io/write.c (write_float): check signbit for Infinity. From-SVN: r83757
2004-06-26re PR libfortran/16196 (gfortran fails to create file with ↵Bud Davis1-1/+1
OPEN(...,status='REPLACE')) 2004-06-26 Bud Davis <bdavis9659@comcast.net> PR gfortran/16196 * unix.c(regular_file): create file if it does not exist. * gfortran.fortran-torture/execute/open_replace.f90: New test case. From-SVN: r83709
2004-06-22re PR fortran/15750 (IOLENGTH form of INQUIRE statement not implemented)Janne Blomqvist3-0/+57
PR fortran/15750 * io.c (gfc_match_inquire): Bugfix for iolength related stuff. (gfc_resolve_inquire): Resolve the iolength tag. Return SUCCESS at end of function if no failure has occured. * resolve.c (resolve_code): Resolve if iolength is encountered. * trans-io.c: (ioparm_iolength, iocall_iolength, iocall_iolength_done): New variables. (last_dt): Add IOLENGTH. (gfc_build_io_library_fndecls ): Set iolength related variables. (gfc_trans_iolength): Implement. (gfc_trans_dt_end): Treat iolength as a third form of data transfer. libgfortran/ PR fortran/15750 * inquire.c (st_inquire): Add comment * io.h (st_parameter): Add iolength. (st_iolength, st_iolength_done): Declare. * transfer.c (iolength_transfer, iolength_transfer_init, st_iolength, st_iolength_done): New functions. testsuite/ * gfortran.fortran-torture/execute/iolength_1.f90: New test. * gfortran.fortran-torture/execute/iolength_3.f90: New test. From-SVN: r83472
2004-06-19re PR libfortran/16080 (segmentation fault when reading empty string)Bud Davis1-1/+1
2004-06-19 Bud Davis <bdavis9659@comcast.net> PR gfortran/16080 * io/list_read.c(set_value): fixed spelling. From-SVN: r83389
2004-06-19re PR libfortran/16080 (segmentation fault when reading empty string)Bud Davis1-2/+7
2004-06-19 Bud Davis <bdavis9659@comcast.net> PR gfortran/16080 * gfortran.fortran-torture/execute/read_null_string.f90: New file. * io/list_read.c(set_value): don't copy if the string is null. From-SVN: r83388
2004-06-12re PR libfortran/12839 (incorrect IO of Inf)Bud Davis1-7/+17
2004-06-12 Bud Davis <bdavis9659@comcast.net> PR gfortran/12839 * gfortran.fortran-torture/execute/nan_inf_fmt.f90: New test. * io/write.c(write_float): format inf and nan IAW F2003. From-SVN: r83024
2004-06-09re PR libfortran/14897 ('T' edit descriptor output incorrect)Bud Davis1-9/+17
2004-06-09 Bud Davis <bdavis9659@comcast.net> PR gfortran/14897 * gfortran.fortran-torture/execute/t_edit.f90 * io/transfer.c (formatted_transfer): position is unique for T and TL edit descriptors. (data_transfer_init): set record length to size of internal file. From-SVN: r82808
2004-06-09re PR libfortran/15755 (gfortran: backspace call causes bus error)Bud Davis1-1/+1
2004-06-08 Bud Davis <bdavis9659@comcast.net> PR gfortran/15755 * gfortran.fortran-torture/execute/backspace.c : New test. * io/backspace.c(st_backspace): call correct routine for formatted and un-formatted units. From-SVN: r82806
2004-05-21io.c (check_format): As a GNU extension...Roger Sayle1-1/+1
* io.c (check_format): As a GNU extension, allow the comma after a string literal to be optional in a format. Use gfc_notify_std to issue an error/warning as appropriate. * io/format.c (parse_format_list): Allow the comma after a string literal to be optional. From-SVN: r82109
2004-05-18re PR libfortran/15235 (libgfortran doesn't build on Solaris 10)Tobias Schlüter5-52/+52
PR fortran/15235 * gfortran.h (offset_t): Rename to ... (gfc_offset): ... this. * io/backspace.c (formatted_backspace, unformatted_backspace), io/io.h (stream, gfc_unit, global_t, file_length, file_position), transfer.c (us_read, us_write, next_record_r, next_record_w), io/unit.c (init_units), unix.c (unix_stream, fd_alloc, fd_alloc_r_at, fd_alloc_w_at, fd_seek, mmap_alloc, mmap_alloc_r_at, mmap_alloc_w_at, mmap_seek, mem_alloc_r_at, mem_alloc_w_at, mem_seek, file_length, file_position): Replace all occurences of offset_t by gfc_offset. From-SVN: r81994
2004-05-16* io/format.c (write_real): Don't include padding in format.Paul Brook1-4/+3
From-SVN: r81922
2004-05-16* io/format.c (format_lex): Make c an int.Paul Brook1-1/+2
From-SVN: r81920
2004-05-16write.c (write_logical): Don't print extra blank.Janne Blomqvist1-4/+26
* io/write.c (write_logical): Don't print extra blank. (write_integer): Base field width on kind. (list_formatted_write): Output initial blank. Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r81914
2004-05-16io.h (flush): Add prototype.Janne Blomqvist3-1/+16
* io/io.h (flush): Add prototype. * io/transfer.c (finalize_transfer): Flush partial records. * io/unix.c (flush): New function. From-SVN: r81913
2004-05-15re PR libfortran/15234 (libgfortran doesn't compile on Tru64 UNIX V4.0F)Tobias Schlüter10-54/+54
PR fortran/15234 * io/io.h (unit_t): Rename to ... (gfc_unit) ... this. (unit_root, current_unit, find_file, find_unit, get_unit): Now of type gfc_unit. (delete_file, insert_unit, close_unit): Argument now of type gfc_unit. * backspace.c (st_backspace), close.c (st_close), endfile.c (st_endfile), inquire.c (inquire_via_unit, st_inquire), open.c (test_endfile, edit_modes, new_unit, already_open, st_open), rewind.c (st_rewind), transfer.c (current_unit), unit.c (internal_unit, unit_cache, rotate_left, rotate_right, insert, insert_unit, delete_root, delete_treap, delete_unit, find_unit, get_unit, init_units, close_unit), unix.c (find_file0, find_file, delete_file): Replace all occurences of unit_t by gfc_unit. From-SVN: r81903
2004-05-15re PR libfortran/15311 (Incorrect handling of A edit descriptor)Bud Davis1-2/+2
PR fortran/15311 * io/write.c (write_a): right justify A edit output. libgfortran/ * gfortran.fortran-torture/execute/write_a_1.f90: New test. From-SVN: r81895
2004-05-13format.c: (parse_format_list): No comma is required after P descriptor.Tobias Schlüter1-2/+2
* io/format.c: (parse_format_list): No comma is required after P descriptor. From-SVN: r81819
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo15-0/+10016
From-SVN: r81764