]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/29625 (Octal edit descriptors allow real variables, even with -std...
authorTobias Burnus <burnus@net-b.de>
Sat, 28 Oct 2006 21:05:42 +0000 (23:05 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Sat, 28 Oct 2006 21:05:42 +0000 (23:05 +0200)
2006-10-28 Tobias Burnus <burnus@net-b.de>

PR fortran/29625
* io/transfer.c (formatted_transfer_scalar): Allow binary edit
  descriptors for real variables; give error for BOZ edit
  descriptor for non-integers when using -std=f*.

From-SVN: r118111

libgfortran/ChangeLog
libgfortran/io/transfer.c

index fc9aeea0ee3b8321b93cb42047c5170fe862ac01..d73d188742e7129a53451c17560c4c7fe59f0f87 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-28 Tobias Burnus <burnus@net-b.de>
+
+       PR fortran/29625
+       * io/transfer.c (formatted_transfer_scalar): Allow binary edit
+         descriptors for real variables; give error for BOZ edit
+         descriptor for non-integers when using -std=f*.
+
 2006-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/29563
index aacf4a33ded56c6635ca6e313e4c7b2633054655..46fae1b2a1dfd99a4f1ed7f0ea454ab5fa53db0a 100644 (file)
@@ -844,7 +844,9 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len,
        case FMT_B:
          if (n == 0)
            goto need_data;
-         if (require_type (dtp, BT_INTEGER, type, f))
+
+         if (compile_options.allow_std < GFC_STD_GNU
+              && require_type (dtp, BT_INTEGER, type, f))
            return;
 
          if (dtp->u.p.mode == READING)
@@ -856,7 +858,11 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len,
 
        case FMT_O:
          if (n == 0)
-           goto need_data;
+           goto need_data; 
+
+         if (compile_options.allow_std < GFC_STD_GNU
+              && require_type (dtp, BT_INTEGER, type, f))
+           return;
 
          if (dtp->u.p.mode == READING)
            read_radix (dtp, f, p, len, 8);
@@ -869,6 +875,10 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len,
          if (n == 0)
            goto need_data;
 
+         if (compile_options.allow_std < GFC_STD_GNU
+              && require_type (dtp, BT_INTEGER, type, f))
+           return;
+
          if (dtp->u.p.mode == READING)
            read_radix (dtp, f, p, len, 16);
          else