This is an archive of the discontinued LLVM Phabricator instance.

[flang] Support CHARACTER(4) pointer targets
ClosedPublic

Authored by jeanPerier on Jun 29 2023, 5:34 AM.

Details

Summary

fir.rebox is emitting an llvm.sdiv to compute the character length
given the byte size from the input descriptor.
Inside a fir.global, this is not needed given the target length must
be accessible via the type, and it caused MLIR to fail LLVM IR
code generation (and crash).

Use the input type length when available instead.

Diff Detail

Event Timeline

jeanPerier created this revision.Jun 29 2023, 5:34 AM
jeanPerier requested review of this revision.Jun 29 2023, 5:34 AM
PeteSteinfeld accepted this revision.Jun 29 2023, 6:04 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jun 29 2023, 6:04 AM
vzakhari accepted this revision.Jun 29 2023, 9:35 AM
This revision was automatically updated to reflect the committed changes.