This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use rank from the allocate object when allocate with mold
ClosedPublic

Authored by clementval on Feb 1 2023, 8:08 AM.

Details

Summary

The rank from the allocate object might be different from the rank
from the mold expression. Use the rank from the allocate object
when applying to mold so the bounds can be set correctly.

Diff Detail

Event Timeline

clementval created this revision.Feb 1 2023, 8:08 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 1 2023, 8:08 AM
clementval requested review of this revision.Feb 1 2023, 8:08 AM

The code looks good, one issue with the LIT checks.

flang/test/Lower/allocatable-polymorphic.f90
537

This line should be removed too (the source environment dependent path length is leaking in the "79").

clementval updated this revision to Diff 493979.Feb 1 2023, 9:06 AM

Remove dependent check length

clementval marked an inline comment as done.Feb 1 2023, 9:11 AM
clementval added inline comments.
flang/test/Lower/allocatable-polymorphic.f90
537

Thanks for spotting this.

This revision is now accepted and ready to land.Feb 2 2023, 1:20 AM
This revision was automatically updated to reflect the committed changes.
clementval marked an inline comment as done.