summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-21 18:23:20 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-21 18:23:20 +0000
commit81f01f54ea9ee3cfcb8a1b6a7229d10bcc3fbd93 (patch)
treed5c3ed5aa7ca5e90fb29fbd5c6867f125b31a42f /libgfortran
parent5b00351b5a9dca4b6f3c47c6be03472315120aec (diff)
downloadgcc-81f01f54ea9ee3cfcb8a1b6a7229d10bcc3fbd93.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222274 138bc75d-0d04-0410-961f-82ee72b054a4
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 e17dcae46d3..2df9030d058 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 42be2586e1f..2068af7eb84 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;