From 68c28e37e494a639dd6f7e7d21c79af7f8b71d17 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Thu, 28 Nov 2019 18:33:20 +0000 Subject: re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output) PR fortran/90374 * io.c (check_format): Allow zero width expoenent with e0. * io/format.c (parse_format_list): Relax format checking to allow e0 exponent specifier. * gfortran.dg/fmt_zero_width.f90: Update test. From-SVN: r278817 --- gcc/fortran/io.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/io.c') diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 57a3fdd..8cf8c2d 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1007,9 +1007,22 @@ data_desc: goto fail; if (u != FMT_POSINT) { - error = G_("Positive exponent width required in format string " - "at %L"); - goto syntax; + if (u == FMT_ZERO) + { + if (!gfc_notify_std (GFC_STD_F2018, + "Positive exponent width required in " + "format string at %L", &format_locus)) + { + saved_token = u; + goto fail; + } + } + else + { + error = G_("Positive exponent width required in format " + "string at %L"); + goto syntax; + } } } -- cgit v1.1