2 ! PR59700 Test case by Steve Kargl
8 integer, parameter :: fd
= 10
14 open(unit
=fd
, status
='scratch')
15 write(fd
, '(A)') '1 2 3.4 q'
19 read(fd
, *, err
=10, iomsg
=msg
) i1
, i2
, i3
, i4
20 10 if (msg
/= 'Bad integer for item 3 in list input') call abort
23 read(fd
, *, err
=20, iomsg
=msg
) x1
, x2
, x3
, x4
24 20 if (msg
/= 'Bad real number in item 4 of list input') call abort
27 read(fd
, *, err
=30, iomsg
=msg
) i1
, x2
, x1
, a
28 30 if (msg
/= 'Bad logical value while reading item 4') call abort
30 read(fd
, *, err
=31, iomsg
=msg
) i1
, x2
, a
, x1
31 31 if (msg
/= 'Bad repeat count in item 3 of list input') call abort
33 open(unit
=fd
, status
='scratch')
34 write(fd
, '(A)') '(1, 2) (3.4, q)'
37 read(fd
, *, err
=40, iomsg
=msg
) c1
, c2
38 40 if (msg
/= 'Bad floating point number for item 2') call abort