This is an archive of the discontinued LLVM Phabricator instance.

flang] Fix folding of LEN(f(...))
ClosedPublic

Authored by klausler on Jun 28 2022, 2:27 PM.

Details

Summary

[LEN(f(...)), where "f" is a non-intrinsic function, should not be folded
to anything else unless the result is a known constant value. While there
are conceivable cases in which we could do better (e.g., an internal function
whose length is a host-associated INTENT(IN) dummy argument), there are
other cases that we're getting wrong.

Diff Detail

Event Timeline

klausler created this revision.Jun 28 2022, 2:27 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jun 28 2022, 2:27 PM
This revision is now accepted and ready to land.Jun 29 2022, 4:37 AM
This revision was automatically updated to reflect the committed changes.