annotate gcc/testsuite/gfortran.dg/fmt_error_9.f @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-std=gnu" }
kono
parents:
diff changeset
3 ! PR38439 I/O PD edit descriptor inconsistency
kono
parents:
diff changeset
4 ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
kono
parents:
diff changeset
5 character(len=25) :: str
kono
parents:
diff changeset
6 character(len=132) :: msg, line
kono
parents:
diff changeset
7 str = '(1pd24.15e6)'
kono
parents:
diff changeset
8 line = "initial string"
kono
parents:
diff changeset
9 x = 555.25
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 write (line,str,iostat=istat, iomsg=msg) 1.0d0, 1.234
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 if (istat.ne.5006 .or. msg(1:15).ne."Period required") STOP 1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
13 if (line.ne."initial string") STOP 2
111
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 str = '(1pf0.15)'
kono
parents:
diff changeset
16 write (line,str,iostat=istat, iomsg=msg) 1.0d0
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
17 if (istat.ne.0) STOP 3
111
kono
parents:
diff changeset
18 read (*,str,iostat=istat, iomsg=msg) x
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
19 if (istat.ne.5006 .or. msg(1:10).ne."Zero width") STOP 4
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
20 if (x.ne.555.25) STOP 5
111
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 write (line,'(1pd24.15e11.3)') 1.0d0, 1.234
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
23 if (line.ne." 1.000000000000000D+00 1.234E+00") STOP 6
111
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 str = '(1p2d24.15)'
kono
parents:
diff changeset
26 msg = " 1.000000000000000D+00 1.233999967575073D+00That's it!"
kono
parents:
diff changeset
27 write (line,'(1p2d24.15a)') 1.0d0, 1.234, "That's it!"
kono
parents:
diff changeset
28 if (line.ne.msg) print *, msg
kono
parents:
diff changeset
29 end