This is an archive of the discontinued LLVM Phabricator instance.

Fixes assertion that arose from bad FIR being constructed.
ClosedPublic

Authored by clementval on Jun 8 2022, 6:41 AM.

Details

Summary
  • Fix assertion strings.
  • Fixes assertion that arose from bad FIR being constructed.

With the default member-wise component assignment, the LHS and RHS may
be compatible but distinct types. This change to lowering manages both
the LHS and RHS independently rather than assume the two types are
identical. This avoids creating bogus FIR and asserting/crashing in
codegen.

Update the tests with the member-wise copy code.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Jun 8 2022, 6:41 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 8 2022, 6:41 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jun 8 2022, 6:41 AM

All builds and tests correctly and looks good to me. But you should get someone more familiar with lowering code to approve.

jeanPerier accepted this revision.Jun 8 2022, 8:50 AM
This revision is now accepted and ready to land.Jun 8 2022, 8:50 AM
This revision was automatically updated to reflect the committed changes.