[flang][hlfir] Support type bound procedure in type descriptors
authorJean Perier <jperier@nvidia.com>
Tue, 28 Feb 2023 13:11:39 +0000 (14:11 +0100)
committerJean Perier <jperier@nvidia.com>
Tue, 28 Feb 2023 13:11:44 +0000 (14:11 +0100)
commita98b031e4f38520dbf53c2f25efac6c4dd77d0b5
tree502b10ca3982d2fe0656290e35f08d1ebcd7a046
parent88be49599f3a899c712bd6a56bad2585bda6388f
[flang][hlfir] Support type bound procedure in type descriptors

In hlfir, procedure designators are propagated as fir.box_proc.
Derived type descriptors are compiler generated constant structure
constructors. They contain CFPTR components for the type bound
procedure addresses.
Before being cast to an integer type so that they can be stored
in the CFPTR components, the fir.box_proc addresses must be
obtained with a fir.box_addr.

Differential Revision: https://reviews.llvm.org/D144952
flang/lib/Lower/ConvertConstant.cpp
flang/test/Lower/HLFIR/type-bound-proc-tdesc.f90 [new file with mode: 0644]