PR fortran/48958 - Add runtime diagnostics for SIZE intrinsic function
authorHarald Anlauf <anlauf@gmx.de>
Mon, 16 Nov 2020 21:00:58 +0000 (22:00 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 16 Nov 2020 21:00:58 +0000 (22:00 +0100)
commit0c81ccc3d87098b93b0e6a2dd76815e4d6e78ff0
tree5ffcbfe00738b49706f8003bd3fb49e13badfba9
parenta71a2255bc692e41341ad04360925a3c7443ba16
PR fortran/48958 - Add runtime diagnostics for SIZE intrinsic function

Add code for runtime checking of status of ALLOCATABLE and POINTER
arguments to the SIZE intrinsic when -fcheck=pointer is specified.

gcc/fortran/ChangeLog:

* trans-intrinsic.c (gfc_conv_intrinsic_size): Generate runtime
checking code for status of argument.

gcc/testsuite/ChangeLog:

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