diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-06-07 23:59:53 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-06-07 23:59:53 +0000 |
commit | 9355110f96f64237672a85f677f9876f979ab9bf (patch) | |
tree | 487800676128abb382d449fe3bde8cb9bd059db8 /libgfortran/io/transfer.c | |
parent | 8955a00563959780a959086f6c79173d80fbfab8 (diff) | |
download | gcc-9355110f96f64237672a85f677f9876f979ab9bf.zip gcc-9355110f96f64237672a85f677f9876f979ab9bf.tar.gz gcc-9355110f96f64237672a85f677f9876f979ab9bf.tar.bz2 |
re PR fortran/36420 (Fortran 2008: g0 edit descriptor)
2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/36420
PR libfortran/36421
PR libfortran/36422
* io/io.h: Add prototype for write_real.
* io/transfer.c (formatted_transfer_scalar): For FMT_G and width zero,
use write_real.
* io/format.c: Add zero width error message. (parse_format_list): Use
error message for FMT_A if followed by FMT_ZERO. Use zero width error
message for FMT_G if mode is READ or if -std=f95 or f2003. (fmormat0):
Fix typo in comment.
* io/write.c (write_a): Set wlen to len if FMT_G and length is zero.
(write_l): Add wlen variable and use it if FMT_G and width is zero.
(write_decimal): If FMT_G, set m to -1 to flag processor dependent
formatting. (write_real): Remove static declaration.
From-SVN: r136545
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r-- | libgfortran/io/transfer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index ff7e651..36181f6f 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1175,7 +1175,10 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len, write_a (dtp, f, p, len); break; case BT_REAL: - write_d (dtp, f, p, len); + if (f->u.real.w == 0) + write_real (dtp, p, len); + else + write_d (dtp, f, p, len); break; default: bad_type: |