111
|
1 ! { dg-do run }
|
|
2 ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
3 ! Test of decimal= feature
|
|
4
|
|
5 integer :: istat
|
|
6 character(80) :: msg
|
|
7 real, dimension(4) :: a, b, c
|
|
8 namelist /mynml/ a, b
|
|
9 msg = "yes"
|
|
10 a = 43.21
|
|
11 b = 3.131
|
|
12 c = 5.432
|
|
13 open(99, decimal="comma", status="scratch")
|
|
14 write(99,'(10f8.3)') a
|
|
15 a = 0.0
|
|
16 rewind(99)
|
|
17 read(99,'(10f8.3)') a
|
131
|
18 if (any(a.ne.43.21)) STOP 1
|
111
|
19
|
|
20 write(msg,'(dp,f8.3,dc,f8.2,dp,f8.3)', decimal="comma") a(1), b(1), c(1)
|
131
|
21 if (trim(msg).ne." 43.210 3,13 5.432") STOP 2
|
111
|
22
|
|
23 close(99)
|
|
24 open(99, decimal="comma", status="scratch")
|
|
25 write(99,nml=mynml)
|
|
26 a = 0.0
|
|
27 b = 0.0
|
|
28 rewind(99)
|
|
29 read(99,nml=mynml)
|
131
|
30 if (any(a.ne.43.21)) STOP 3
|
|
31 if (any(b.ne.3.131)) STOP 4
|
111
|
32 close(99)
|
|
33 end
|