[flang] [llvm] [flang][folding] fix i(a)char folding regression (PR #155909)
Eugene Epshteyn via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 13:04:42 PDT 2025
================
@@ -123,3 +123,12 @@ subroutine s4(ix)
call s4(index3)
call s4(index4) ! ok
end
+
+subroutine ichar_tests()
+ integer, parameter :: a1 = ichar('B')
+ !Without -Wportability, the warning isn't emitted and the parameter is constant.
+ integer, parameter :: a2 = ichar('B ')
+ !ERROR: Character in intrinsic function ichar must have length one
+ !ERROR: Must be a constant value
+ integer, parameter :: a3 = ichar('')
+end subroutine
----------------
eugeneepshteyn wrote:
I think github wants you to have extra end of line here
https://github.com/llvm/llvm-project/pull/155909
More information about the llvm-commits
mailing list