resolve.c (resolve_transfer): Set derived to correct symbol for BT_CLASS.
authorSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 30 Oct 2017 19:33:12 +0000 (19:33 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 30 Oct 2017 19:33:12 +0000 (19:33 +0000)
2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>

* resolve.c (resolve_transfer): Set derived to correct symbol for
BT_CLASS.

2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>

* gfortran.dg/dtio_13.f90: Remove TODO comment and dg-error test.

From-SVN: r254241

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/dtio_13.f90

index 67ebf7bc2f15e30889230b68dc4e0728f6222f1d..0d4a873437e826756a3bfc890994429c07779caa 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>
+
+       * resolve.c (resolve_transfer): Set derived to correct symbol for 
+       BT_CLASS.
+
 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
 
        * invoke.texi: Delete adb and sdb references.
index 5062bcb755a15d00d3a4d71aa97b608635c4ab5a..104c02f96bbeacce7bbec45842c405e4e5f88846 100644 (file)
@@ -9181,7 +9181,7 @@ resolve_transfer (gfc_code *code)
   if (dt && dt->dt_io_kind->value.iokind != M_INQUIRE
       && (ts->type == BT_DERIVED || ts->type == BT_CLASS))
     {
-      if (ts->type == BT_DERIVED)
+      if (ts->type == BT_DERIVED || ts->type == BT_CLASS)
        derived = ts->u.derived;
       else
        derived = ts->u.derived->components->ts.u.derived;
index 40ef87e2e212c65de19fb1d44c7fb57637ed5a9c..0ffba855b77b4a3c28fcad31f8bb3d57547e6c8c 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-30  Steven G. Kargl   <kargl@gcc.gnu.org>
+
+       * gfortran.dg/dtio_13.f90: Remove TODO comment and dg-error test.
+
 2017-10-30  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/82085
index 9b907201afcf71be5e1f7f619c3f885f32ae1c73..131af05c847df2b56d0555749f2f97d6d9282aae 100644 (file)
@@ -136,9 +136,7 @@ program test
    character(3) :: a, b
    class(t) :: chairman ! { dg-error "must be dummy, allocatable or pointer" }
    open (unit=71, file='myunformatted_data.dat', form='unformatted')
-! The following error is spurious and is eliminated if previous error is corrected.
-! TODO Although better than an ICE, fix me.
-   read (71) a, chairman, b ! { dg-error "cannot be polymorphic" }
+   read (71) a, chairman, b 
    close (unit=71)
 end