--- /dev/null
+! { dg-do run }
+! PR52251 Tabs with advance = 'no'
+write( *, '( t25 )', advance = 'no' )
+write( *, '( "hello" )' ) ! { dg-output " hello(\n|\r\n|\r)" }
+end
+
+2015-11-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/52251
+ * io/transfer.c (formatted_transfer_scalar_write): Reset skips count.
+ (finalize_transfer): For ADVANCE_NO, emit pending spaces and reset the
+ skip count.
+
2015-11-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/write_float.def (output_float): Move block determining
- dtp->u.p.current_unit->bytes_left);
dtp->u.p.max_pos =
dtp->u.p.max_pos > tmp ? dtp->u.p.max_pos : tmp;
+ dtp->u.p.skips = 0;
}
if (dtp->u.p.skips < 0)
{
next I/O operation if needed. */
if (dtp->u.p.advance_status == ADVANCE_NO)
{
+ if (dtp->u.p.skips > 0)
+ {
+ int tmp;
+ write_x (dtp, dtp->u.p.skips, dtp->u.p.pending_spaces);
+ tmp = (int)(dtp->u.p.current_unit->recl
+ - dtp->u.p.current_unit->bytes_left);
+ dtp->u.p.max_pos =
+ dtp->u.p.max_pos > tmp ? dtp->u.p.max_pos : tmp;
+ dtp->u.p.skips = 0;
+ }
int bytes_written = (int) (dtp->u.p.current_unit->recl
- dtp->u.p.current_unit->bytes_left);
dtp->u.p.current_unit->saved_pos =