On 5/18/21 11:36 AM, Harald Anlauf via Fortran wrote:
The generation of the new runtime check picked up the wrong attributes
in the case of CLASS array arguments.  There is related new code in
gfc_conv_procedure_call which served as reference for the fix.

Regtested on x86_64-pc-linux-gnu.

OK for mainline / 11-branch?

Thanks,
Harald


Fortran: Fix erroneous "pointer argument is not associated" runtime error

For CLASS arrays we need to use the CLASS data attributes to determine
which runtime check to generate.

gcc/fortran/ChangeLog:

        PR fortran/100602
        * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
        attributes for CLASS arrays for generation of runtime error.

gcc/testsuite/ChangeLog:

        PR fortran/100602
        * gfortran.dg/pointer_check_14.f90: New test.


Yes, OK for both, thanks

Jerry

Reply via email to