[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Semantics / modfile28.f90
blobe00bd13f6c75e3433d19426c7c7c2c64a9d38512
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
3 ! Test UTF-8 support in character literals
4 ! Note: Module files are encoded in UTF-8.
6 module m
7 character(kind=4,len=*), parameter :: c4 = 4_"Hi! 你好!"
8 ! In CHARACTER(1) literals, codepoints > 0xff are serialized into UTF-8;
9 ! each of those bytes then gets encoded into UTF-8 for the module file.
10 character(kind=1,len=*), parameter :: c1 = 1_"Hi! 你好!"
11 character(kind=4,len=*), parameter :: c4a(*) = [4_"一", 4_"二", 4_"三", 4_"四", 4_"五"]
12 integer, parameter :: lc4 = len(c4)
13 integer, parameter :: lc1 = len(c1)
14 end module m
16 !Expect: m.mod
17 !module m
18 !character(*,4),parameter::c4=4_"Hi! \344\275\240\345\245\275!"
19 !character(*,1),parameter::c1="Hi! \344\275\240\345\245\275!"
20 !character(*,4),parameter::c4a(1_8:*)=[CHARACTER(KIND=4,LEN=1)::4_"\344\270\200",4_"\344\272\214",4_"\344\270\211",4_"\345\233\233",4_"\344\272\224"]
21 !integer(4),parameter::lc4=7_4
22 !intrinsic::len
23 !integer(4),parameter::lc1=11_4
24 !end