From: Steven G. Kargl Date: Mon, 30 Oct 2017 19:33:12 +0000 (+0000) Subject: resolve.c (resolve_transfer): Set derived to correct symbol for BT_CLASS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c51bf96b4b62689d53ce4cb12006eef9696af9b;p=gcc.git resolve.c (resolve_transfer): Set derived to correct symbol for BT_CLASS. 2017-10-30 Steven G. Kargl * resolve.c (resolve_transfer): Set derived to correct symbol for BT_CLASS. 2017-10-30 Steven G. Kargl * gfortran.dg/dtio_13.f90: Remove TODO comment and dg-error test. From-SVN: r254241 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 67ebf7bc2f1..0d4a873437e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2017-10-30 Steven G. Kargl + + * resolve.c (resolve_transfer): Set derived to correct symbol for + BT_CLASS. + 2017-10-29 Jim Wilson * invoke.texi: Delete adb and sdb references. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 5062bcb755a..104c02f96bb 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40ef87e2e21..0ffba855b77 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-10-30 Steven G. Kargl + + * gfortran.dg/dtio_13.f90: Remove TODO comment and dg-error test. + 2017-10-30 Paolo Carlini PR c++/82085 diff --git a/gcc/testsuite/gfortran.dg/dtio_13.f90 b/gcc/testsuite/gfortran.dg/dtio_13.f90 index 9b907201afc..131af05c847 100644 --- a/gcc/testsuite/gfortran.dg/dtio_13.f90 +++ b/gcc/testsuite/gfortran.dg/dtio_13.f90 @@ -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