This is an archive of the discontinued LLVM Phabricator instance.

[flang][lowering] handle MERGE with different FSOURCE and TSOURCE types
ClosedPublic

Authored by clementval on Jun 24 2022, 1:52 AM.

Details

Summary

In merge FSOURCE and TSOURCE must have the same Fortran dynamic types,
but this does not imply that FSOURCE and TSOURCE will be lowered to the
same MLIR types. For instance, TSOURCE may be a character expression
with a compile type constant length (!fir.char<1,4>) while FSOURCE may
have dynamic length (!fir.char<1,?>).

Cast FSOURCE to TSOURCE MLIR types to handle these cases.

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 24 2022, 1:52 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 24 2022, 1:52 AM
clementval requested review of this revision.Jun 24 2022, 1:52 AM
PeteSteinfeld accepted this revision.Jun 24 2022, 7:02 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jun 24 2022, 7:02 AM