[libgfortran,committed] Fix default SIGN mode on preconnected/internal units
FX
fxcoudert@gmail.com
Tue Aug 25 16:27:00 GMT 2015
Preconnected and internal units currently have their sign mode set to SIGN_SUPPRESS, rather than the logical value of SIGN_UNSPECIFIED. This does not matter in most cases, since our chosen processor-dependent behavior is to suppress optional plus signs anyway…
… except when one tries to override the default behavior with environment variable GFORTRAN_OPTIONAL_PLUS, which is thus currently broken on internal and preconnected units. Take the following code:
character(len=20) :: s
print *, 42.
write(s,"(G0)") 42.
print *, s
end
without the patch, run with “GFORTRAN_OPTIONAL_PLUS=y”, it will still output:
42.0000000
42.0000000
while with the patch, it will now correctly output (with GFORTRAN_OPTIONAL_PLUS=y):
+42.0000000
+42.0000000
I regtested on x86_64-apple-darwin15, and committed as trivial.
(I couldn’t come up with a way to figure out how to test that in the testuite, though.)
FX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sign.ChangeLog
Type: application/octet-stream
Size: 174 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150825/870a4df4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sign.diff
Type: application/octet-stream
Size: 1634 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150825/870a4df4/attachment-0001.obj>
More information about the Fortran
mailing list