2 c { dg-options "-std=legacy" }
4 c SEGVs in loop.c with -O2.
6 character*80
function nxtlin
(lun
,ierr
,itok
)
7 character onechr*1
,twochr*2
,thrchr*3
10 read (lun
,'(a)',iostat
=ierr
) nxtlin
11 if (nxtlin
(1:1).ne
.'#') then
14 if (nxtlin
(it
:it
).ne
.' ' .and
. nxtlin
(it
+1:it
+1).eq
.' ')
19 if (nxtlin
(itt
:itt
).eq
.'*') itast
=itt
22 do while (nxtlin
(itstrt
:itstrt
).eq
.' ')
28 onechr
=nxtlin
(itstrt
:itstrt
)
30 elseif
(nchrs
.eq
.2) then
31 twochr
=nxtlin
(itstrt
:itstrt
+1)
33 elseif
(nchrs
.eq
.3) then
34 thrchr
=nxtlin
(itstrt
:itstrt
+2)
36 elseif
(nchrs
.eq
.4) then
37 thrchr
=nxtlin
(itstrt
:itstrt
+3)