This is a lot less complex than the data case where the shape has to be accounted for, so the implementation is done inline. One corner case will not be supported correctly for now: the case where POINTER and TARGET points to the same internal procedure may return false because lowering is creating fir.embox_proc each time the address of an internal procedure is taken, so different thunk for the same internal procedure/host link may be created and compare to false. This will be fixed in a later patch that moves creating of internal procedure fir.embox_proc in the host so that the addresses are the same when the host link is the same. This change is required to properly support the required lifetime of internal procedure addresses anyway (should be the always be the lifetime of the host, even when the address is taken in an internal procedure).
105 KiB
105 KiB