[flang-commits] [PATCH] D137030: [flang] Improve warning message
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Oct 31 12:47:35 PDT 2022
klausler updated this revision to Diff 472106.
klausler added a comment.
Adjust test for portability.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137030/new/
https://reviews.llvm.org/D137030
Files:
flang/lib/Evaluate/host.cpp
flang/test/Evaluate/folding04.f90
Index: flang/test/Evaluate/folding04.f90
===================================================================
--- flang/test/Evaluate/folding04.f90
+++ flang/test/Evaluate/folding04.f90
@@ -17,26 +17,25 @@
!WARN: warning: division by zero
real(4), parameter :: r4_ninf = -1._4/0._4
- !WARN: warning: invalid argument on intrinsic function
+ !WARN: warning: invalid argument on evaluation of intrinsic function or operation
real(4), parameter :: nan_r4_acos1 = acos(1.1)
TEST_ISNAN(nan_r4_acos1)
- !WARN: warning: invalid argument on intrinsic function
+ !WARN: warning: invalid argument on evaluation of intrinsic function or operation
real(4), parameter :: nan_r4_acos2 = acos(r4_pmax)
TEST_ISNAN(nan_r4_acos2)
- !WARN: warning: invalid argument on intrinsic function
+ !WARN: warning: invalid argument on evaluation of intrinsic function or operation
real(4), parameter :: nan_r4_acos3 = acos(r4_nmax)
TEST_ISNAN(nan_r4_acos3)
- !WARN: warning: invalid argument on intrinsic function
+ !WARN: warning: invalid argument on evaluation of intrinsic function or operation
real(4), parameter :: nan_r4_acos4 = acos(r4_ninf)
TEST_ISNAN(nan_r4_acos4)
- !WARN: warning: invalid argument on intrinsic function
+ !WARN: warning: invalid argument on evaluation of intrinsic function or operation
real(4), parameter :: nan_r4_acos5 = acos(r4_pinf)
TEST_ISNAN(nan_r4_acos5)
!WARN: warning: second argument to MOD must not be zero
real(4), parameter :: nan_r4_mod = mod(3.5, 0.)
TEST_ISNAN(nan_r4_mod)
-
- !WARN: warning: overflow on intrinsic function
+ !WARN: warning: overflow on evaluation of intrinsic function or operation
logical, parameter :: test_exp_overflow = exp(256._4).EQ.r4_pinf
end module
Index: flang/lib/Evaluate/host.cpp
===================================================================
--- flang/lib/Evaluate/host.cpp
+++ flang/lib/Evaluate/host.cpp
@@ -141,7 +141,8 @@
}
if (!flags_.empty()) {
- RealFlagWarnings(context, flags_, "intrinsic function");
+ RealFlagWarnings(
+ context, flags_, "evaluation of intrinsic function or operation");
}
errno = 0;
if (fesetenv(&originalFenv_) != 0) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137030.472106.patch
Type: text/x-patch
Size: 2197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221031/675a47e7/attachment.bin>
More information about the flang-commits
mailing list