This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix TYPE/CLASS IS (T(...)) in SELECT TYPE
ClosedPublic

Authored by klausler on Apr 13 2022, 12:59 PM.

Details

Summary

TYPE IS and CLASS IS guards in SELECT TYPE constructs are
allowed to specify the same type as the type of the selector
but f18's implementation of that predicate required strict
equality of the derived type representations. We need to
allow for assumed values of LEN type parameters to match
explicit and deferred type parameter values in the selector
and require equality for KIND type parameters. Implement
DerivedTypeSpec::Match() to perform this more relaxed type
comparison, and use it in check-select-type.cpp.

Diff Detail

Event Timeline

klausler created this revision.Apr 13 2022, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:59 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Apr 13 2022, 12:59 PM
vdonaldson accepted this revision.Apr 13 2022, 2:44 PM
This revision is now accepted and ready to land.Apr 13 2022, 2:44 PM
This revision was automatically updated to reflect the committed changes.