aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgfortran/io/format.c16
-rw-r--r--libgfortran/io/write_float.def2
3 files changed, 19 insertions, 7 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 91768c0..74e36ac 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,7 +1,13 @@
+2019-11-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
+
+ PR fortran/90374
+ * io/format.c (parse_format_list): Relax format checking to allow
+ e0 exponent specifier.
+
2019-11-24 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/92100
- io/transfer.c (data_transfer_init_worker): Use fbuf_reset
+ * io/transfer.c (data_transfer_init_worker): Use fbuf_reset
instead of fbuf_flush before the seek. Note that fbuf_reset
calls fbuf_flush and adjusts fbuf pointers.
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index b336208..dd448c8 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -1027,11 +1027,17 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
{
t = format_lex (fmt);
if (t != FMT_POSINT)
- {
- fmt->error = "Positive exponent width required in format";
- goto finished;
- }
-
+ if (t == FMT_ZERO)
+ {
+ notify_std (&dtp->common, GFC_STD_F2018,
+ "Positive exponent width required");
+ }
+ else
+ {
+ fmt->error = "Positive exponent width required in "
+ "format string at %L";
+ goto finished;
+ }
tail->u.real.e = fmt->value;
}
diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def
index daa1667..ce6aec8 100644
--- a/libgfortran/io/write_float.def
+++ b/libgfortran/io/write_float.def
@@ -482,7 +482,7 @@ build_float_string (st_parameter_dt *dtp, const fnode *f, char *buffer,
for (i = abs (e); i >= 10; i /= 10)
edigits++;
- if (f->u.real.e < 0)
+ if (f->u.real.e <= 0)
{
/* Width not specified. Must be no more than 3 digits. */
if (e > 999 || e < -999)