unit.c
19.7 KB
-
re PR libfortran/52434 (Insufficient number of digits in floating point formatting) · 37b659dd
2012-03-15 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/52434 PR libfortran/48878 PR libfortran/38199 * io/unit.c (get_internal_unit): Default to ROUND_UNSPECIFIED. (init_units): Likewise. * io/write_float.def (determine_precision): New function. (output_float): Take into account buffer with %f format, no need for our own rounding if unspecified or processor specified rounding. (DTOA): Simplify format string, add parameters. (FDTOA): New macros similar to DTOA, but using %f format. (OUTPUT_FLOAT_FMT_G): Stack allocate newf, determine correct precision and fill buffer. (EN_PREC): New macro. (determine_en_precision): New function. (WRITE_FLOAT): For G format, move buffer filling into output_float_FMT_G, use FDTOA for F format. (write_float): Increase buffer due to F format. testsuite ChangeLog: 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/52434 PR libfortran/48878 PR libfortran/38199 * gfortran.dg/edit_real_1.f90: Don't assume roundTiesToAway. * gfortran.dg/round_1.f03: Likewise. From-SVN: r185433
Janne Blomqvist committed