]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178]
authorHarald Anlauf <anlauf@gmx.de>
Wed, 5 Jul 2023 20:21:09 +0000 (22:21 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sat, 8 Jul 2023 13:57:33 +0000 (15:57 +0200)
commitb1079fc88f082d3c5b583c8822c08c5647810259
tree57c8b853ed0233a50843d2999911375129131e25
parent7ac1581d066a6f3a0d4acf1042a74634258b4966
Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178]

gcc/fortran/ChangeLog:

PR fortran/92178
* trans-expr.cc (gfc_conv_procedure_call): Check procedures for
allocatable dummy arguments with INTENT(OUT) and move deallocation
of actual arguments after evaluation of argument expressions before
the procedure is executed.

gcc/testsuite/ChangeLog:

PR fortran/92178
* gfortran.dg/intent_out_16.f90: New test.
* gfortran.dg/intent_out_17.f90: New test.
* gfortran.dg/intent_out_18.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/intent_out_16.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/intent_out_17.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/intent_out_18.f90 [new file with mode: 0644]