]> git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: correctly handle optional allocatable dummy arguments
authorYuao Ma <c8ef@outlook.com>
Thu, 13 Nov 2025 14:50:28 +0000 (22:50 +0800)
committerc8ef <c8ef@outlook.com>
Fri, 14 Nov 2025 15:27:48 +0000 (23:27 +0800)
commit14e5e4ee1ff4aa499eb036a950e1695351bc0e2e
tree1bc2cc5df3e7e3837f1170a1758975b1b1ab2eea
parent7a5a92a643b883f3ad3c959045f2cd2d1552c1a6
fortran: correctly handle optional allocatable dummy arguments

This patch fixes a regression introduced in r14-8400-g186ae6d2cb93ad.

gcc/fortran/ChangeLog:

* trans-expr.cc (conv_dummy_value): Add check for NULL allocatable.

gcc/testsuite/ChangeLog:

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