[Bug fortran/41453] use INTENT(out) for optimization
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 25 12:48:32 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41453
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mikael Morin <mikael@gcc.gnu.org>:
https://gcc.gnu.org/g:95375ffb3dd59f51e79408dd3b2b620dc1af71b1
commit r13-2840-g95375ffb3dd59f51e79408dd3b2b620dc1af71b1
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Thu Sep 1 11:27:36 2022 +0200
fortran: Support clobbering of allocatables and pointers [PR41453]
This adds support for clobbering of allocatable and pointer scalar
variables passed as actual argument to a subroutine when the associated
dummy has the INTENT(OUT) attribute.
Support was explicitly disabled (since the beginning for pointers, since
r11-7315-g2df374b337a5f6cf5528e91718e4e12e4006b7ae for allocatables),
but the clobber generation code seems to support it well, as
demonstrated by the newly added testcase.
PR fortran/41453
PR fortran/99169
gcc/fortran/ChangeLog:
* trans-expr.cc (gfc_conv_procedure_call): Remove conditions
on ALLOCATABLE and POINTER attributes guarding clobber
generation.
gcc/testsuite/ChangeLog:
* gfortran.dg/intent_optimize_9.f90: New test.
More information about the Gcc-bugs
mailing list