[flang-commits] [flang] [flang] Complete implementation of OUT_OF_RANGE() (PR #89334)

via flang-commits flang-commits at lists.llvm.org
Fri Apr 19 09:34:55 PDT 2024


================
@@ -320,4 +350,12 @@ module m
   logical, parameter :: test_r16i16ur = all(out_of_range(real(i16v, kind=16)+.5_16, 1_16, .true.)  .eqv. [.false., .true.])
   logical, parameter :: test_r16i16d  = all(out_of_range(real(i16v, kind=16)-.5_16, 1_16, .false.) .eqv. [.false., .true.])
   logical, parameter :: test_r16i16dr = all(out_of_range(real(i16v, kind=16)-.5_16, 1_16, .true.)  .eqv. [.false., .true.])
+
+ contains
+  subroutine s(x, r)
+    real(8), intent(in) :: x
+    logical, intent(in), optional :: r
+    !WARN: warning: ROUND= argument to OUT_OF_RANGE() is an optional dummy argument that must be present at execution
----------------
jeanPerier wrote:

This is an implementation limitation, from a standard perspective r could be an absent at runtime, right?

https://github.com/llvm/llvm-project/pull/89334


More information about the flang-commits mailing list