File: namelist_utf8.f90

package info (click to toggle)
gcc-arm-none-eabi 15%3A12.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 959,712 kB
  • sloc: cpp: 3,275,382; ansic: 2,061,766; ada: 840,956; f90: 208,513; makefile: 76,132; asm: 73,433; xml: 50,448; exp: 34,146; sh: 32,436; objc: 15,637; fortran: 14,012; python: 11,991; pascal: 6,787; awk: 4,779; perl: 3,054; yacc: 338; ml: 285; lex: 201; haskell: 122
file content (30 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
! { dg-do run { xfail powerpc*-apple-darwin* } }
! PR52539 UTF-8 support for namelist read and write

character(len=10, kind=4) :: str, str2
character(len=25, kind=4) :: str3

namelist /nml/ str

str = 4_'1a'//char (int (z'4F60'),4)     &
      //char (int (z'597D'), 4)//4_'b'
open(6, encoding='utf-8')
open(99, encoding='utf-8',form='formatted')
write(99, '(3a)') '&nml str = "', str, '" /'
write(99, '(a)') str
rewind(99)

str = 4_'XXXX'
str2 = 4_'YYYY'
read(99,nml=nml)
read(99, *) str2
if (str2 /= str) STOP 1
rewind(99)

read(99,'(A)') str3
if (str3 /= 4_'&nml str = "' // str // 4_'" /') STOP 2
read(99,*) str3
if (str3 /= str) STOP 3

close(99, status='delete')
end