This is an archive of the discontinued LLVM Phabricator instance.

[flang] Accept structure constructor value for polymorphic component
ClosedPublic

Authored by klausler on Feb 14 2022, 10:57 AM.

Details

Summary

Semantic analysis was emitting a bogus error message when a structure
constructor contains a monomorphic value for a (limited) polymorphic
component of a derived type. The type compatibility test was too
strict; this patch relaxes it a little to allow values that could
be assigned or passed to a variable or dummy argument with that type.
Also add some quotes to an error message that was sometimes confusing
without them, and remove a repeated space character from another.

Diff Detail

Event Timeline

klausler created this revision.Feb 14 2022, 10:57 AM
klausler requested review of this revision.Feb 14 2022, 10:57 AM
PeteSteinfeld accepted this revision.Feb 14 2022, 12:41 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Feb 14 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 4:00 PM