Commit be0cc7e2 by Paul Thomas

[multiple changes]

2005-07-12 Paul Thomas  <pault@gcc.gnu.org>

	PR libfortran/16435
	* transfer.c (formatted_transfer): Correct the problems
	with X- and T-editting that caused TLs followed by TRs
	to overwrite data, which caused NIST FM908.FOR to fail
	on many tests.
	(data_transfer_init): Zero X- and T-editting counters at
	the start of formatted IO.
	* write.c (write_x): Write specified number of skips with
	specified number of spaces at the end.

2005-07-12  Paul Thomas  <pault@gcc.gnu.org>

	PR libfortran/16435
	* gfortran.dg/tl_editting.f90: New.
	* gfortran.dg/g77/f77-edit-x-out.f: Remove XFAIL.

From-SVN: r102008
parent 93e261ac
2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435
* gfortran.dg/tl_editting.f90: New.
* gfortran.dg/g77/f77-edit-x-out.f: Remove XFAIL.
2005-07-14 Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/char_array_constructor.f90: New test.
......
......@@ -8,5 +8,5 @@ C ( dg-output "^" }
write(*,'(I1,1X,I1,2X,I1)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C Section 13.5.3 explains why there are no trailing blanks
write(*,'(I1,1X,I1,2X,I1,3X)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C { dg-output "\$" {xfail *-*-*} } gfortran PR 16435
C { dg-output "\$" }
end
! { dg-do run }
! Test of fix to bug triggered by NIST fm908.for.
! Left tabbing, followed by X or T-tabbing to the right would
! cause spaces to be overwritten on output data.
! Contributed by Paul Thomas <pault@gcc.gnu.org>
program tl_editting
character*10 :: line
character*10 :: aline = "abcdefxyij"
character*2 :: bline = "gh"
character*10 :: cline = "abcdefghij"
write (line, '(a10,tl6,2x,a2)') aline, bline
if (line.ne.cline) call abort ()
end program tl_editting
\ No newline at end of file
2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435
* transfer.c (formatted_transfer): Correct the problems
with X- and T-editting that caused TLs followed by TRs
to overwrite data, which caused NIST FM908.FOR to fail
on many tests.
(data_transfer_init): Zero X- and T-editting counters at
the start of formatted IO.
* write.c (write_x): Write specified number of skips with
specified number of spaces at the end.
2005-07-13 Paul Thomas <pault@gcc.gnu.org>
* io/read.c (read_complex): Prevent X formatting during reads
......
......@@ -638,7 +638,7 @@ internal_proto(write_l);
extern void write_o (fnode *, const char *, int);
internal_proto(write_o);
extern void write_x (fnode *);
extern void write_x (int, int);
internal_proto(write_x);
extern void write_z (fnode *, const char *, int);
......
......@@ -1110,15 +1110,16 @@ write_es (fnode *f, const char *p, int len)
/* Take care of the X/TR descriptor. */
void
write_x (fnode * f)
write_x (int len, int nspaces)
{
char *p;
p = write_block (f->u.n);
p = write_block (len);
if (p == NULL)
return;
memset (p, ' ', f->u.n);
if (nspaces > 0)
memset (&p[len - nspaces], ' ', nspaces);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment