Fortran: Fix problem with runtime pointer check [PR99602].
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 28 Mar 2021 15:48:27 +0000 (16:48 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 28 Mar 2021 18:39:50 +0000 (19:39 +0100)
commit297363774e6a5dca2f46a85ab086f1d9e59431ac
tree396b7b7ff01733f9a5d5a51d9218d6ff67d433b1
parent5a5d23010ab8ecbefd443054d9a3ec227aceb976
Fortran: Fix problem with runtime pointer check [PR99602].

2021-03-28  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran/ChangeLog

PR fortran/99602
* trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
for class expressions and detect proc pointer evaluations by
the non-null actual argument list.

gcc/testsuite/ChangeLog

PR fortran/99602
* gfortran.dg/pr99602.f90: New test.
* gfortran.dg/pr99602a.f90: New test.
* gfortran.dg/pr99602b.f90: New test.
* gfortran.dg/pr99602c.f90: New test.
* gfortran.dg/pr99602d.f90: New test.
gcc/fortran/trans-expr.c
gcc/testsuite/gfortran.dg/pr99602.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr99602a.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr99602b.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr99602c.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr99602d.f90 [new file with mode: 0644]