This is an archive of the discontinued LLVM Phabricator instance.

[flang] Capture result interface of functions called in internal procedures
ClosedPublic

Authored by clementval on Jun 22 2022, 12:16 PM.

Details

Summary

Character and array results are allocated on the caller side. This
require evaluating the result interface on the call site. When calling
such functions inside an internal procedure, it is possible that the
interface is defined in the host, in which case the lengths/bounds of
the function results must be captured so that they are available in
the internal function to emit the call.

To handle this case, extend the PFT symbol visit to visit the bounds and length
parameters of functions called in the internal procedure parse tree.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Jean Perier <jperier@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Jun 22 2022, 12:16 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 22 2022, 12:16 PM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jun 22 2022, 12:16 PM
klausler accepted this revision.Jun 22 2022, 12:29 PM
This revision is now accepted and ready to land.Jun 22 2022, 12:29 PM