Commit Graph

18 Commits

Author SHA1 Message Date
Bud Davis 519b0e16cd re PR libfortran/12839 (incorrect IO of Inf)
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-28 01:30:26 +00:00
Bud Davis 3e14aaa2aa re PR libfortran/16196 (gfortran fails to create file with 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-26 11:49:06 +00:00
Janne Blomqvist 8750f9cdec re PR fortran/15750 (IOLENGTH form of INQUIRE statement not implemented)
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-22 00:43:55 +00:00
Bud Davis bb9db7b136 re PR libfortran/16080 (segmentation fault when reading empty string)
2004-06-19  Bud Davis  <bdavis9659@comcast.net>

        PR gfortran/16080
        * io/list_read.c(set_value): fixed spelling.

From-SVN: r83389
2004-06-19 17:03:16 +00:00
Bud Davis 04b0faec08 re PR libfortran/16080 (segmentation fault when reading empty string)
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-19 16:42:05 +00:00
Bud Davis 8204210bd6 re PR libfortran/12839 (incorrect IO of Inf)
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-12 12:50:54 +00:00
Bud Davis 898c05b8bd re PR libfortran/14897 ('T' edit descriptor output incorrect)
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-09 01:03:02 +00:00
Bud Davis 31b6f11ab0 re PR libfortran/15755 (gfortran: backspace call causes bus error)
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-06-09 00:55:04 +00:00
Roger Sayle 11670eebf3 io.c (check_format): As a GNU extension...
* 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-21 21:37:25 +00:00
Tobias Schlüter 81f4be3ce1 re PR libfortran/15235 (libgfortran doesn't build on Solaris 10)
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-18 18:06:09 +02:00
Paul Brook 6d3e9d8454 * io/format.c (write_real): Don't include padding in format.
From-SVN: r81922
2004-05-16 20:17:04 +00:00
Paul Brook 28963c8f26 * io/format.c (format_lex): Make c an int.
From-SVN: r81920
2004-05-16 18:21:42 +00:00
Janne Blomqvist d464f8e99e write.c (write_logical): Don't print extra blank.
* 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-16 14:07:58 +00:00
Janne Blomqvist 000aa32a49 io.h (flush): Add prototype.
* 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-16 13:27:48 +00:00
Tobias Schlüter 909087e0cf re PR libfortran/15234 (libgfortran doesn't compile on Tru64 UNIX V4.0F)
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-15 22:44:38 +02:00
Bud Davis 94161cec95 re PR libfortran/15311 (Incorrect handling of A edit descriptor)
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-15 18:35:39 +00:00
Tobias Schlüter 187f073476 format.c: (parse_format_list): No comma is required after P descriptor.
* io/format.c: (parse_format_list): No comma is required after
	P descriptor.

From-SVN: r81819
2004-05-13 23:36:16 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00