[flang-commits] [PATCH] D159038: [flang] Fold OUT_OF_RANGE()

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Aug 28 16:42:03 PDT 2023


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
Herald added a project: All.
klausler requested review of this revision.

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.


https://reviews.llvm.org/D159038

Files:
  flang/lib/Evaluate/fold-logical.cpp
  flang/test/Evaluate/fold-merge-bits.f90
  flang/test/Evaluate/fold-merge_bits.f90
  flang/test/Evaluate/fold-out_of_range.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159038.554104.patch
Type: text/x-patch
Size: 35674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230828/80dd629d/attachment-0001.bin>


More information about the flang-commits mailing list