gcc/libgfortran/io
Thomas Koenig 181c9f4a9b re PR fortran/23815 (Add -byteswapio flag)
2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* io.c (top level):  Add convert to io_tag.
	(resolve_tag):  convert is GFC_STD_GNU.
	(match_open_element):  Add convert.
	(gfc_free_open):  Likewise.
	(gfc_resolve_open):  Likewise.
	(gfc_free_inquire):  Likewise.
	(match_inquire_element):  Likewise.
	* dump-parse-tree.c (gfc_show_code_node):  Add
	convet for open and inquire.
	gfortran.h: Add convert to gfc_open and gfc_inquire.
	* trans-io.c (gfc_trans_open):  Add convert.
	(gfc_trans_inquire):  Likewise.
	* ioparm.def:  Add convert to open and inquire.
	* gfortran.texi:  Document CONVERT.

2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* io/file_pos.c (unformatted_backspace):  If flags.convert
	does not equal CONVERT_NATIVE, reverse the record marker.
	* io/open.c:  Add convert_opt[].
	(st_open):  If no convert option is given, set CONVERT_NATIVE.
	If CONVERT_BIG or CONVERT_LITTLE are given, set flags.convert to
	CONVERT_NATIVE or CONVERT_SWAP (depending on wether we have
	a big- or little-endian system).
	* io/transfer.c (unformatted_read):  Remove unused attribute
	from arguments.
	If we need to reverse
	bytes, break up large transfers into a loop.  Split complex
	numbers into its two parts.
	(unformatted_write):  Likewise.
	(us_read):  If flags.convert does not equal CONVERT_NATIVE,
	reverse the record marker.
	(next_record_w): Likewise.
	(reverse_memcpy):  New function.
	* io/inquire.c (inquire_via_unit):  Implement convert.
	* io/io.h (top level):  Add enum unit_convert.
	Add convert to st_parameter_open and st_parameter_inquire.
	Define IOPARM_OPEN_HAS_CONVERT and IOPARM_INQUIRE_HAS_CONVERT.
	Increase padding for st_parameter_dt.
	Declare reverse_memcpy().

2005-12-10  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/23815
	* gfortran.dg/unf_io_convert_1.f90:  New test.
	* gfortran.dg/unf_io_convert_2.f90:  New test.
	* gfortran.dg/unf_io_convert_3.f90:  New test.

From-SVN: r108358
2005-12-10 20:01:56 +00:00
..
close.c re PR fortran/14943 (read/write code generation is not thread safe) 2005-11-21 23:03:56 +01:00
file_pos.c re PR fortran/23815 (Add -byteswapio flag) 2005-12-10 20:01:56 +00:00
format.c format.c: Removing unused code. 2005-12-04 18:13:59 +00:00
inquire.c re PR fortran/23815 (Add -byteswapio flag) 2005-12-10 20:01:56 +00:00
io.h re PR fortran/23815 (Add -byteswapio flag) 2005-12-10 20:01:56 +00:00
list_read.c re PR libfortran/24919 ([4.0] CRLF support in libgfortran) 2005-11-27 11:42:46 +00:00
lock.c re PR fortran/14943 (read/write code generation is not thread safe) 2005-11-21 23:03:56 +01:00
open.c re PR fortran/23815 (Add -byteswapio flag) 2005-12-10 20:01:56 +00:00
read.c re PR libfortran/25039 ([4.1 only] comma short-circuit field width) 2005-12-09 02:53:41 +00:00
size_from_kind.c random.c: Include config.h 2005-11-27 17:09:40 -05:00
transfer.c re PR fortran/23815 (Add -byteswapio flag) 2005-12-10 20:01:56 +00:00
unit.c re PR fortran/25109 (formatted reads with embedded blanks in input fields) 2005-11-28 00:23:28 +00:00
unix.c re PR libfortran/24919 ([4.0] CRLF support in libgfortran) 2005-11-27 11:42:46 +00:00
unix.h re PR fortran/14943 (read/write code generation is not thread safe) 2005-11-21 23:03:56 +01:00
write.c * io/write.c (namelist_write): Correct type in previous commit. 2005-11-27 11:56:25 +00:00