[all-commits] [llvm/llvm-project] 09b464: [flang] Fix passing NULL to OPTIONAL procedure poi...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Feb 1 08:43:56 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 09b4649ea5cefc4f93d9c936d38863df5c6568ed
https://github.com/llvm/llvm-project/commit/09b4649ea5cefc4f93d9c936d38863df5c6568ed
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-02-01 (Thu, 01 Feb 2024)
Changed paths:
M flang/lib/Lower/ConvertCall.cpp
M flang/test/Lower/HLFIR/procedure-pointer.f90
Log Message:
-----------
[flang] Fix passing NULL to OPTIONAL procedure pointers (#80267)
Procedure pointer lowering used `prepareUserCallActualArgument` because
it was convenient, but this helper was not meant for POINTERs when
originally written and it did not handled passing NULL to an OPTIONAL
procedure pointer correctly.
The resulting argument should be a disassociated pointer, not an absent
pointer (Fortran 15.5.2.12 point 1.).
Move the logic for procedure pointer argument "cooking" in its own
helper to avoid triggering the logic that created an absent argument in
this case.
More information about the All-commits
mailing list