[all-commits] [llvm/llvm-project] e84a98: [Flang] Support for NULL() and procedure in struct...
Daniel Chen via All-commits
all-commits at lists.llvm.org
Thu Mar 21 10:51:01 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e84a985cbf4b26c10812e9bd339db9cfd037f581
https://github.com/llvm/llvm-project/commit/e84a985cbf4b26c10812e9bd339db9cfd037f581
Author: Daniel Chen <cdchen at ca.ibm.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M flang/lib/Lower/ConvertConstant.cpp
A flang/test/Lower/HLFIR/procedure-pointer-component-structure-constructor.f90
Log Message:
-----------
[Flang] Support for NULL() and procedure in structure constructor for procedure pointer component. (#85991)
This PR fixes a subset of procedure pointer component initialization in
structure constructor.
It covers
1. NULL()
2. procedure
For example:
```
MODULE M
TYPE :: DT
!PROCEDURE(Fun), POINTER, NOPASS :: pp1
PROCEDURE(Fun), POINTER :: pp1
END TYPE
CONTAINS
INTEGER FUNCTION Fun(Arg)
class(dt) :: arg
END FUNCTION
END MODULE
PROGRAM MAIN
USE M
IMPLICIT NONE
TYPE (DT), PARAMETER :: v1 = DT(NULL())
TYPE (DT) :: v2
v2 = DT(fun)
END
```
Passing a procedure pointer itself or reference to a function that
returns a procedure pointer is TODO.
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