re PR fortran/82312 ([OOP] Pointer assignment to component of class variable results...
authorPaul Thomas <pault@gcc.gnu.org>
Mon, 2 Oct 2017 18:17:39 +0000 (18:17 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 2 Oct 2017 18:17:39 +0000 (18:17 +0000)
commitda3723a8d5fd122e23d3664c37cb2f63b8b6ebcf
tree9bc2d2fccfec8b11b64c98728674df0220d06e67
parent20a7e14aadb19439b36115bbf8e75ffc70f23501
re PR fortran/82312 ([OOP] Pointer assignment to component of class variable results wrong vptr for the variable.)

2017-10-02  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82312
* resolve.c (gfc_resolve_code): Simplify condition for class
pointer assignments becoming regular assignments by asserting
that only class valued targets are permitted.
* trans-expr.c (trans_class_pointer_fcn): New function using a
block of code from gfc_trans_pointer_assignment.
(gfc_trans_pointer_assignment): Call the new function. Tidy up
a minor whitespace issue.

2017-10-02  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82312
* gfortran.dg/typebound_proc_36.f90 : New test.

From-SVN: r253362
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/typebound_proc_36.f90 [new file with mode: 0644]