]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix passing of optional dummies to bind(c) procedures [PR113866]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 13 Feb 2024 19:19:10 +0000 (20:19 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 29 Mar 2024 16:38:56 +0000 (17:38 +0100)
commit5f9144021615f24d038890dab7db2a0b9e84f6d3
treed19636e746174ab8809bacd8f69abe9e85dce5a1
parent250990298fb792635d9895e7642ccedbc2dd39d4
Fortran: fix passing of optional dummies to bind(c) procedures [PR113866]

PR fortran/113866

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_procedure_call): When passing an optional
dummy argument to an optional dummy argument of a bind(c) procedure
and the dummy argument is passed via a CFI descriptor, no special
presence check and passing of a default NULL pointer is needed.

gcc/testsuite/ChangeLog:

* gfortran.dg/bind_c_optional-2.f90: New test.

(cherry picked from commit f4935df217ad89f884f908f39086b322e80123d0)
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/bind_c_optional-2.f90 [new file with mode: 0644]