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-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-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/17143
* runtime/error.c (itoa): keep from overflowing during
mod operation by using unsigned variable.
* gfortran.dg/pr17143.f90: New test.
From-SVN: r86532
2004-08-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/17164
* runtime/string_intrinsics.c (string_index):check for
substring longer than string.
* gfortran.dg/pr17164.f90: New test.
From-SVN: r86527
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-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-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-09-09 Victor Leikehman <lei@il.ibm.com>
* m4/matmul.m4, m4/matmull.m4, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/transpose_generic.c:
Allocate space if return value has NULL in its data field.
* generated/*.c: Regenerate.
From-SVN: r85717
* m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
space if return value descriptor has NULL in its data field,
and initialize bounds and stride.
* intrinsics/size.c (array_t, size0): Declarations moved to
libgfortran.h.
* generated/*.c: Regenerate.
From-SVN: r85558
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
* intrinsics/rand.c (rand): Wrap the irand() call from the previous
commit in prefix.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r83895
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
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-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
* random.c: Fix several spelling and formatting mistakes in
comments.
(random_r8): Fix loop to make random numbers range in [0,1(.
Co-Authored-By: Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
From-SVN: r83063
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-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