libgfortran/ChangeLog:
PR libfortran/98825
* io/transfer.c (next_record_w): Insert check for seen_dollar and if
so, skip issueing next record.
gcc/testsuite/ChangeLog:
PR libfortran/98825
* gfortran.dg/dollar_edit_descriptor_4.f: New test.
--- /dev/null
+! { dg-do run }
+! { dg-options "-std=gnu" }
+! PR98825 Test for fix of '$' edit descriptor.
+ character(30) :: line
+ 10 format (i3,$)
+
+ open(10, status='scratch')
+ write (10,10) 1
+ write (10,10) 2,3,4,5
+! Check the result.
+ line = 'abcdefg'
+ rewind(10)
+ read(10, '(a)') line
+ close(10)
+ if (line .ne. ' 1 2 3 4 5') call abort
+ end
}
}
}
+ else if (dtp->u.p.seen_dollar == 1)
+ break;
/* Handle legacy CARRIAGECONTROL line endings. */
else if (dtp->u.p.current_unit->flags.cc == CC_FORTRAN)
next_record_cc (dtp);