aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2015-04-21 18:23:20 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2015-04-21 18:23:20 +0000
commit72cb12b07770bf62cee1fe9c1a9d3c27da2968e6 (patch)
treed5c3ed5aa7ca5e90fb29fbd5c6867f125b31a42f /libgfortran
parentdfce59eba33b2d602fa9c10451f571a596a9a4d8 (diff)
downloadgcc-72cb12b07770bf62cee1fe9c1a9d3c27da2968e6.zip
gcc-72cb12b07770bf62cee1fe9c1a9d3c27da2968e6.tar.gz
gcc-72cb12b07770bf62cee1fe9c1a9d3c27da2968e6.tar.bz2
re PR libfortran/65234 (Output descriptor (*(1E15.7)) not accepted)
2015-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/65234 * io/format.c (parse_format_list): Set the seen_dd flag in all cases where a data descriptor has been seen. From-SVN: r222274
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/format.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index e17dcae..2df9030 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,11 @@
2015-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+ PR libgfortran/65234
+ * io/format.c (parse_format_list): Set the seen_dd flag in all
+ cases where a data descriptor has been seen.
+
+2015-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
PR libgfortran/56743
* io/list_read.c (CASE_SEPARATORS): Add case for '!'.
(is_separator): Add condition for '!'.
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index 42be258..2068af7 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -624,6 +624,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
get_fnode (fmt, &head, &tail, FMT_LPAREN);
tail->repeat = -2; /* Signifies unlimited format. */
tail->u.child = parse_format_list (dtp, &seen_data_desc);
+ *seen_dd = seen_data_desc;
if (fmt->error != NULL)
goto finished;
if (!seen_data_desc)
@@ -851,6 +852,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
switch (t)
{
case FMT_L:
+ *seen_dd = true;
t = format_lex (fmt);
if (t != FMT_POSINT)
{
@@ -873,6 +875,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
break;
case FMT_A:
+ *seen_dd = true;
t = format_lex (fmt);
if (t == FMT_ZERO)
{
@@ -897,12 +900,14 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
case FMT_G:
case FMT_EN:
case FMT_ES:
+ *seen_dd = true;
get_fnode (fmt, &head, &tail, t);
tail->repeat = repeat;
u = format_lex (fmt);
if (t == FMT_G && u == FMT_ZERO)
{
+ *seen_dd = true;
if (notification_std (GFC_STD_F2008) == NOTIFICATION_ERROR
|| dtp->u.p.mode == READING)
{
@@ -928,6 +933,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
}
if (t == FMT_F && dtp->u.p.mode == WRITING)
{
+ *seen_dd = true;
if (u != FMT_POSINT && u != FMT_ZERO)
{
fmt->error = nonneg_required;
@@ -969,8 +975,10 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
tail->u.real.e = -1;
if (t2 == FMT_D || t2 == FMT_F)
- break;
-
+ {
+ *seen_dd = true;
+ break;
+ }
/* Look for optional exponent */
t = format_lex (fmt);
@@ -1011,6 +1019,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
case FMT_B:
case FMT_O:
case FMT_Z:
+ *seen_dd = true;
get_fnode (fmt, &head, &tail, t);
tail->repeat = repeat;