This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fold OUT_OF_RANGE()
ClosedPublic

Authored by klausler on Aug 28 2023, 4:42 PM.

Details

Summary

Fold the F'2018 intrinsic function OUT_OF_RANGE(), which returns .TRUE.
when a conversion of an integer or real value to an integer or real type
would yield an overflow or (for real->integer only) invalid operand
exception. Test all type combinations, with both rounding possibilities
for the real->integer cases.

Diff Detail

Event Timeline

klausler created this revision.Aug 28 2023, 4:42 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Aug 28 2023, 4:42 PM
vdonaldson accepted this revision.Aug 28 2023, 6:37 PM
This revision is now accepted and ready to land.Aug 28 2023, 6:37 PM
This revision was automatically updated to reflect the committed changes.