[all-commits] [llvm/llvm-project] 499858: [Flang] Support for passing procedure pointer, ref...
Daniel Chen via All-commits
all-commits at lists.llvm.org
Tue Mar 26 08:29:47 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4998587e6f5f66d464ac22ad4c11fe9afd2d56ab
https://github.com/llvm/llvm-project/commit/4998587e6f5f66d464ac22ad4c11fe9afd2d56ab
Author: Daniel Chen <cdchen at ca.ibm.com>
Date: 2024-03-26 (Tue, 26 Mar 2024)
Changed paths:
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/ConvertExprToHLFIR.cpp
M flang/test/Lower/HLFIR/procedure-pointer-component-structure-constructor.f90
Log Message:
-----------
[Flang] Support for passing procedure pointer, reference to a function that returns a procedure pointer to structure constructor. (#86533)
This PR fixes `not yet implemented: procedure pointer component in
structure constructor` as shown in the following test case.
```
MODULE M
TYPE :: DT
PROCEDURE(Fun), POINTER, NOPASS :: pp1
END TYPE
CONTAINS
INTEGER FUNCTION Fun(Arg)
INTEGER :: Arg
Fun = Arg
END FUNCTION
END MODULE
PROGRAM MAIN
USE M
IMPLICIT NONE
TYPE (DT) :: v2
PROCEDURE(FUN), POINTER :: pp2
v2 = DT(pp2)
v2 = DT(bar())
CONTAINS
FUNCTION BAR() RESULT(res)
PROCEDURE(FUN), POINTER :: res
END
END
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list