Debian Codegraph @

gcc/testsuite/gfortran.dg/pr99210.f90

raw
1 ! { dg-do run }
2 ! PR99210 X editing for reading file with encoding='utf-8'
3 program test_bug_format_x
4 use iso_fortran_env
5 integer, parameter :: u = selected_char_kind('ISO_10646')
6
7 character(kind=u, len=1) a, b, a1, b1, b2
8
9 open(unit=10, file='test_bug_format_x.tmp', encoding='UTF-8')
10
11 a = char(int(z'03B1'), u)
12 b = char(int(z'03B2'), u)
13 write(10, '(a1, a1)') a, b
14
15 rewind(10)
16 read(10, '(a1, a1)') a1, b1
17
18 rewind(10)
19 read(10, '(1x, a1)') b2
20
21 close (10, status="delete")
22 if(a /= a1 .or. b /= b1) then
23 error stop 1
24 end if
25
26 if(b /= b2) then
27 error stop 2
28 end if
29 end program test_bug_format_x