Fortran: Fix for class functions as associated target [PR98565].
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 22 Jan 2021 17:11:06 +0000 (17:11 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 22 Jan 2021 17:11:32 +0000 (17:11 +0000)
commitbf8ee9e4eed6ba1a6d77b4cf168df480e1f954da
treed1bef3b7aff2f04cf215bcc55e8b7d19da8eff06
parentd7e681fc3afff24a6279058cbb0b0dc4cd96be8c
Fortran: Fix for class functions as associated target [PR98565].

2021-01-22  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/98565
* trans-intrinsic.c (gfc_conv_associated): Do not add a _data
component for scalar class function targets. Instead, fix the
function result and access the _data from that.

gcc/testsuite/
PR fortran/98565
* gfortran.dg/associated_target_7.f90 : New test.
gcc/fortran/trans-intrinsic.c
gcc/testsuite/gfortran.dg/associated_target_7.f90 [new file with mode: 0644]