]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: passing of allocatable/pointer arguments to OPTIONAL+VALUE [PR92887]
authorHarald Anlauf <anlauf@gmx.de>
Wed, 1 Nov 2023 21:55:36 +0000 (22:55 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 3 Nov 2023 17:32:16 +0000 (18:32 +0100)
commit413ac2c8608cd0378955af27f69e45274b025b32
tree1194ff3fe9da30a866c328dddae6a4489ef2206a
parent7ab79a40b546a1470abaf76bec74c63e9990fe47
Fortran: passing of allocatable/pointer arguments to OPTIONAL+VALUE [PR92887]

gcc/fortran/ChangeLog:

PR fortran/92887
* trans-expr.cc (conv_cond_temp): Helper function for creation of a
conditional temporary.
(gfc_conv_procedure_call): Handle passing of allocatable or pointer
actual argument to dummy with OPTIONAL + VALUE attribute.  Actual
arguments that are not allocated or associated are treated as not
present.

gcc/testsuite/ChangeLog:

PR fortran/92887
* gfortran.dg/value_optional_1.f90: New test.
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/value_optional_1.f90 [new file with mode: 0644]