This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/47284] G format outputs wrong number of asterixes


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |jvdelisle at gcc dot
                   |                            |gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-14 08:30:06 UTC ---
Compiler comparison (using 'FORMAT(">",G5.1,"<")'):

gfortran (4.1, 4.3, 4.6), g95, NAG f95, g77 and pgf95 print:
>*    <

ifort, pathf95, openf95, sunf95 and crayftn print:
>*****<


Fortran 2008: "10.7.2 Numeric editing", "10.7.2.1 General rules" item (5):

"(5) On output, if an exponent exceeds its specified or implied width using the
E, EN, ES, D, or G edit descriptor, or the number of characters produced
exceeds the field width, the processor shall fill the entire field of width w
with asterisks. However, the processor shall not produce asterisks if the field
width is not exceeded when optional characters are omitted."

R1007 data-edit-desc is ...
                     or G w [ . d [ E e ] ]
                     or ...

Thus I agree that for "G5.1" one should have five and not only one asterisk.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]