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