2 ! { dg-options "-fno-range-check" }
3 ! PR 52428 Read IO of integers near the end of range. Note that we
4 ! support the two's complement representation even though the Fortran
5 ! numerical model has a symmetric range. (The -fno-range-check option
6 ! is needed to allow the -2147483648 literal.)
9 character(25) :: inputline
= "-2147483648"
13 read(inputline
,100) test
15 if (test
/= -2147483648) call abort
17 read(inputline
, 100, iostat
=st
) test
18 if (st
== 0) call abort
19 inputline(11:11) = "7"
20 read(inputline
, 100) test
21 if (test
/= 2147483647) call abort
23 ! Same as above but with list-formatted IO
24 inputline
= "-2147483648"
25 read(inputline
, *) test
26 if (test
/= -2147483648) call abort
28 read(inputline
, *, iostat
=st
) test
29 if (st
== 0) call abort
30 inputline(11:11) = "7"
31 read(inputline
, *) test
32 if (test
/= 2147483647) call abort