This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/47434] Wrong field width for NaN with (F0.n) formatting
- From: "thenlich at users dot sourceforge.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jan 2011 14:37:40 +0000
- Subject: [Bug libfortran/47434] Wrong field width for NaN with (F0.n) formatting
- Auto-submitted: auto-generated
- References: <bug-47434-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47434
--- Comment #2 from Thomas Henlich <thenlich at users dot sourceforge.net> 2011-01-24 14:37:29 UTC ---
A similar issue occurs with the values +Infinity and 0.0:
program testnan
real :: i, n = 0.0, m = tiny(0.0)
i = 1.0 / n
print "(F0.2)", i
print "(F3.2)", i
print "(F0.2)", n
print "(F3.2)", n
print "(F0.2)", m
print "(F3.2)", m
end program testnan
Output:
+Inf
Inf
0.00
.00
.00
.00
The expected chosen field width is 3 in all cases, exactly for the same reason
demanded by 10.7.2.1(6)