]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/38439 (I/O PD edit descriptor inconsistency)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 12 Oct 2009 00:52:45 +0000 (00:52 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 12 Oct 2009 00:52:45 +0000 (00:52 +0000)
2009-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/38439
* io/format.c (parse_format_list): Correct logic for FMT_F reading vs
writing. Code clean-up.

From-SVN: r152657

libgfortran/ChangeLog
libgfortran/io/format.c

index 0984287c4b7d8428ff1e503579a3aa940cc625f2..b7c75e033ea8cd6d152ea203f60eaf08ffe2af45 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/38439
+       * io/format.c (parse_format_list): Correct logic for FMT_F reading vs
+       writing. Code clean-up.
+
 2009-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/38439
index 7e46e3a25df58456f2a972bf02af9e139af98ad9..97bd2da77ba7db3f5ec4b86eda0c70d1898279d5 100644 (file)
@@ -933,7 +933,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
          tail->u.real.d = fmt->value;
          break;
        }
-      if (t == FMT_F || dtp->u.p.mode == WRITING)
+      if (t == FMT_F && dtp->u.p.mode == WRITING)
        {
          if (u != FMT_POSINT && u != FMT_ZERO)
            {
@@ -941,13 +941,10 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
              goto finished;
            }
        }
-      else
+      else if (u != FMT_POSINT)
        {
-         if (u != FMT_POSINT)
-           {
-             fmt->error = posint_required;
-             goto finished;
-           }
+         fmt->error = posint_required;
+         goto finished;
        }
 
       tail->u.real.w = fmt->value;