This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lowering and implementation for extends_type_of
ClosedPublic

Authored by clementval on Jan 10 2023, 5:11 AM.

Details

Summary

Add implementation and loweirng for the extends_type_of
intrinsic.

The standard mentions this: otherwise if the dynamic type of A or MOLD is
extensible, the result is true if and only if the dynamic type of A is an
extension type of the dynamic type of MOLD. Which could be interpreted that
extends_type_of(a, a) could be false since a type is not an extension of
itself. Gfortran result for this is true so the same behavior is applied
here as well.

Depends on D141364

Diff Detail

Event Timeline

clementval created this revision.Jan 10 2023, 5:11 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 10 2023, 5:11 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jan 10 2023, 5:11 AM

clang-format

jeanPerier accepted this revision.Jan 10 2023, 6:39 AM
jeanPerier added a subscriber: klausler.

LGTM, I think it is also worth adding @klausler as a reviewer on this review.

This revision is now accepted and ready to land.Jan 10 2023, 6:39 AM
PeteSteinfeld accepted this revision.Jan 10 2023, 6:40 AM

All builds and tests correctly and looks good to me.

clementval edited the summary of this revision. (Show Details)