[flang-commits] [PATCH] D142754: [flang] Catch out-of-range constant arguments to CHAR/ACHAR
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Jan 27 11:38:26 PST 2023
klausler updated this revision to Diff 492864.
klausler added a comment.
Use "git show -a" to get a diff of a test file with some non-ASCII characters.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142754/new/
https://reviews.llvm.org/D142754
Files:
flang/lib/Evaluate/fold-character.cpp
flang/test/Evaluate/errors01.f90
flang/test/Evaluate/folding05.f90
Index: flang/test/Evaluate/folding05.f90
===================================================================
--- flang/test/Evaluate/folding05.f90
+++ flang/test/Evaluate/folding05.f90
@@ -11,7 +11,9 @@
logical, parameter :: test_char1_ok2 = char(127_4, 1).EQ.""
logical, parameter :: test_char1_ok3 = char(97_4, 1).EQ."a"
logical, parameter :: test_char1_ok4 = .NOT.char(97_4, 1).EQ."b"
+ !WARN: warning: CHAR(I=355) is out of range for CHARACTER(KIND=1)
logical, parameter :: test_char1_ok5 = char(355_4, 1).EQ."c"
+ !WARN: warning: CHAR(I=-61) is out of range for CHARACTER(KIND=1)
logical, parameter :: test_char1_ok6 = char(-61_1, 1).EQ.char(195_4, 1)
logical, parameter :: test_char2_ok1 = char(0_4, 2).EQ.2_"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142754.492864.patch
Type: text/x-patch
Size: 5654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230127/321ec751/attachment-0001.bin>
More information about the flang-commits
mailing list