This patch is straightforward but the isolation of the problem was rather less so. Many thanks to Juergen for testcase reduction. Regtested on FC33/x86_64 - OK for master? Paul Fortran: Fix problem with runtime pointer chack [PR99602]. 2021-03-26 Paul Thomas 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.