[PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy)
Mark Eggleston
mark.eggleston@codethink.co.uk
Tue Dec 4 14:47:00 GMT 2018
Here is a patch to considered for incorporation into gfortran adding to
its legacy support. It pads character to integer conversions using
spaces instead of zeros when enabled.
The pad character is 'undefined' or 'processor dependent' depending on
which standard you read. This makes it 0x20 which matches the Oracle
Fortran compiler.
Enabled using -fdec-pad-with-spaces and -fdec.
Please find attached a patch file and text files containing change log
entries for gcc/fortran and gcc/testsuite.
Note: I do not have write access so can not commit changes. Someone else
will have to commit the change if it is acceptable.
There are several more patches to support legacy Fortran which will be
sent in order.
regards,
Mark Eggleston
--
https://www.codethink.co.uk/privacy.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pad-character-to-int-conversions-with-spaces-instead.patch
Type: text/x-patch
Size: 4908 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181204/bcbe3730/attachment.bin>
-------------- next part --------------
Jim MacArthur <jim.macarthur@codethink.co.uk>
Mark Eggleston <mark.eggleston@codethink.com>
-fdec-pad-with-spaces
* gcc/fortran/lang.opt: add new option.
* gcc/fortran/options.c (set_dec_flags): add SET_BITFLAG for
flag_dec_pad_with_spaces.
* gcc/fortran/simplify.c (gfc_simplify_transfer): memset with
0x20 instead of 0x0 when flag_dec_pad_with_spaces is set.
-------------- next part --------------
Mark Eggleston <mark.eggleston@codethink.com>
-fdec-pad-with-spaces
* gfortran.dg/dec-pad-with-spaces-1.f90: New test.
* gfortran.dg/dec-pad-with-spaces-2.f90: New test.
* gfortran.dg/dec-pad-with-spaces-3.f90: New test.
More information about the Gcc-patches
mailing list