[PATCH, v1] PR fortran/48958 - Add runtime diagnostics for SIZE intrinsic function
Harald Anlauf
anlauf@gmx.de
Sat Nov 14 22:15:05 GMT 2020
Dear all,
here is a first version to check the status of ALLOCATABLE and POINTER
arguments to the SIZE intrinsic at runtime.
What it does not yet cover is situations like
complex, allocatable :: z(:)
print *, size (z% re)
Feedback, such as comments for improvement, are welcome.
As is, the patch regtests cleanly on x86_64-pc-linux-gnu.
Thanks,
Harald
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr48958.patch
Type: text/x-patch
Size: 2332 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201114/36e2a7d8/attachment.bin>
More information about the Gcc-patches
mailing list