aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2016-10-31 19:59:04 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2016-10-31 19:59:04 +0000
commit120a4c45731e133355d46fc39d7a77ed9c67d67c (patch)
tree292ac1fe7c5478186685607a63e690054cfb4986 /libgfortran
parent5cea3ad6b50bc3bc014b3ce26774e99789c14a2f (diff)
downloadgcc-120a4c45731e133355d46fc39d7a77ed9c67d67c.zip
gcc-120a4c45731e133355d46fc39d7a77ed9c67d67c.tar.gz
gcc-120a4c45731e133355d46fc39d7a77ed9c67d67c.tar.bz2
re PR fortran/54679 (Erroneous "Expected P edit descriptor" in conjunction with L descriptor)
2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/54679 * io.c (check_format): Adjust checks for FMT_L to treat a zero width as an extension, giving warnings or error as appropriate. Improve messages. PR libgfortran/54679 * io/format.c (parse_format_list): Adjust checks for FMT_L to treat a zero width as an extension, giving warnings or error as appropriate. Improve messages. PR fortran/54679 * gfortran.dg/fmt_l.f90: Update test. * gfortran.dg/fmt_l0.f90: New test. From-SVN: r241720
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/format.c18
2 files changed, 19 insertions, 6 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 78d3949..745adf7 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/54679
+ * io/format.c (parse_format_list): Adjust checks for FMT_L to
+ treat a zero width as an extension, giving warnings or error
+ as appropriate. Improve messages.
+
2016-10-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/78123
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index 31bc642..8a18597 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -870,19 +870,25 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
t = format_lex (fmt);
if (t != FMT_POSINT)
{
- if (notification_std(GFC_STD_GNU) == NOTIFICATION_ERROR)
+ if (t == FMT_ZERO)
{
- fmt->error = posint_required;
- goto finished;
+ if (notification_std(GFC_STD_GNU) == NOTIFICATION_ERROR)
+ {
+ fmt->error = "Extension: Zero width after L descriptor";
+ goto finished;
+ }
+ else
+ notify_std (&dtp->common, GFC_STD_GNU,
+ "Zero width after L descriptor");
}
else
{
fmt->saved_token = t;
- fmt->value = 1; /* Default width */
- notify_std (&dtp->common, GFC_STD_GNU, posint_required);
+ notify_std (&dtp->common, GFC_STD_GNU,
+ "Positive width required with L descriptor");
}
+ fmt->value = 1; /* Default width */
}
-
get_fnode (fmt, &head, &tail, FMT_L);
tail->u.n = fmt->value;
tail->repeat = repeat;