This is an archive of the discontinued LLVM Phabricator instance.

[flang] Carry polymoprhic dynamic type when using coordinate_of polymoprhic array
ClosedPublic

Authored by clementval on Oct 27 2022, 9:22 AM.

Details

Summary

Dynamic type of a polymorphic array element was retrieved by finding the
coordinate operation and use the base array. This patch remove this hack and use
the newly PolymorphicValue to carray the dynamic type together with the element.
The patch also rearrange some tests in the allocatable-polymorphic.f90.

Depends on D136824

Diff Detail

Event Timeline

clementval created this revision.Oct 27 2022, 9:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 27 2022, 9:22 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Oct 27 2022, 9:22 AM

@clementval, I was unable to download this patch, so I don't feel like I can review it properly. That might change after you deliver the patches on which this depends.

clementval added a comment.EditedOct 27 2022, 12:01 PM

@clementval, I was unable to download this patch, so I don't feel like I can review it properly. That might change after you deliver the patches on which this depends.

@PeteSteinfeld I'll let you know when it's fixed.

Fix clang-format and test issue

@clementval, I was unable to download this patch, so I don't feel like I can review it properly. That might change after you deliver the patches on which this depends.

@PeteSteinfeld I'll let you know when it's fixed.

@PeteSteinfeld everything should be good now.

Remove debug output

PeteSteinfeld accepted this revision.Oct 27 2022, 1:52 PM

Other that the debugging statements in ConvertExpr.cpp, all builds and tests correctly and looks good. Please remove them before pushing.

flang/lib/Lower/ConvertExpr.cpp
2000–2001

Leftover debugging statements?

2002

Also here.

2007–2008

And here.

This revision is now accepted and ready to land.Oct 27 2022, 1:52 PM