This is an archive of the discontinued LLVM Phabricator instance.

[flang] Do not fold fir.box_addr when it has a slice
ClosedPublic

Authored by clementval on Apr 8 2022, 8:17 AM.

Details

Summary

This patch avoids to fold fir.box_addr when the defining fir.embox op
has a slice. If the op is folded the slice information are lost.

This kind of problem occurred with code like:

call check(y(half+1:))

where y is an array.

Diff Detail

Event Timeline

clementval created this revision.Apr 8 2022, 8:17 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 8 2022, 8:17 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Apr 8 2022, 8:17 AM
This revision is now accepted and ready to land.Apr 8 2022, 9:48 AM
This revision was automatically updated to reflect the committed changes.