The following program prints (with gfortran, NAG f95, ifort) something like 20100817aaaaaaaaaaaaaaaaaaaaaaaaaaaa145358.302aaaaaaaaaaaaaaaaaaaaaaaaaa expected, the number is black padded, i.e. 20100817 145659.787 (as g95, pathf95, openf95 do)
The problem was reported at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/6a2a3804f0f27a65# CHARACTER(LEN=36) :: date, time date = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' time = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' CALL DATE_AND_TIME(date, time) print *, date, time if (index(date, 'a') /= 0 .or. index(time, 'a') /= 0) & call abort () end -- Summary: DATE_AND_TIME does _not_ black-pad strings Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45308