[Bug fortran/38439] I/O PD edit descriptor inconsistency
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 25 19:47:00 GMT 2008
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-12-25 19:45 -------
g77 runtime accepts this and prints:
character(len=25) :: str
str = '(1PD24.15E4)'
write (*,'(1PD24.15E4)') 1.0d0
WRITE (*,str) 1.0d0
end
$ g77 pr38439.f
$ ./a.out
1.000000000000000E+00
1.000000000000000E+00
gfortran 4.4:
$ gfc -std=legacy pr38439.f
pr38439.f:3.72:
write (*,'(1PD24.15E4)') 1.0d0
1
Warning: Period required in format specifier at (1)
[jerry@lenova pr38439]$ ./a.out
1.000000000000000D+0000
1.000000000000000D+0000
I think I will make the run-time consistent with the compile as far as error
messages, giving a runtime warning if not -std-legacy. The 'D' exponent
character is different from g77, but is standard conforming.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38439
More information about the Gcc-bugs
mailing list