http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47567

Thomas Henlich <thenlich at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #20 from Thomas Henlich <thenlich at users dot sourceforge.net> 
2011-02-21 13:22:59 UTC ---
print "(F3.0)", -0.0   ! => -0.
print "(F2.0)", -0.0   ! => **
print "(F1.0)", -0.0   ! => 0

print "(F3.1)", -0.0   ! => -.0
print "(F2.1)", -0.0   ! => **
print "(F1.1)", -0.0   ! => 0

I think it's still wrong: It is not possible for any value to fit into a field
of width w, but not into w+1.

Either

1) For the special case of a zero, we consider the minus sign and the decimal
symbol optional (which I think does not conform to the standard), then the
result should be:

print "(F3.0)", -0.0   ! => -0.
print "(F2.0)", -0.0   ! => -0 (or 0. or 0)
print "(F1.0)", -0.0   ! => 0

print "(F3.1)", -0.0   ! => -.0
print "(F2.1)", -0.0   ! => -0 (or .0 or 0)
print "(F1.1)", -0.0   ! => 0

or

2) We never consider the minus sign nor the decimal symbol optional (which I
think is required by the standard), then the result should be:

print "(F0.0)", -0.0   ! => -0.
print "(F3.0)", -0.0   ! => -0.
print "(F2.0)", -0.0   ! => **
print "(F1.0)", -0.0   ! => *

print "(F0.1)", -0.0   ! => -.0
print "(F3.1)", -0.0   ! => -.0
print "(F2.1)", -0.0   ! => **
print "(F1.1)", -0.0   ! => *

Reply via email to