]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: fix issue with impure elemental subroutine and interface [PR119656]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 8 Apr 2025 20:30:15 +0000 (22:30 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 9 Apr 2025 15:18:44 +0000 (17:18 +0200)
commit334545194d9023fb9b2f72ee0dcde8af94930f25
tree82364273fdaa750198a9d29e42c264937909f7de
parent4645d092969face6aa1da4c919924697185f9cf9
Fortran: fix issue with impure elemental subroutine and interface [PR119656]

PR fortran/119656

gcc/fortran/ChangeLog:

* interface.cc (gfc_compare_actual_formal): Fix front-end memleak
when searching for matching interfaces.
* trans-expr.cc (gfc_conv_procedure_call): If there is a formal
dummy corresponding to an absent argument, use its type, and only
fall back to inferred type otherwise.

gcc/testsuite/ChangeLog:

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