This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / g77.f-torture / execute / 12884.f
blob6e2d894a3bf7f8eb6e2500e239f8ef601a560423
1 IMPLICIT NONE
2 C properly handle a "/" in a $<NAME> $END namelist
3 C pr12884 --
4 C error in reading a namelist when it is preceded by a line with a SLASH
6 CHARACTER*80 DL(7)
7 DATA DL /'$file',
8 1 'oms omsmc.i2',
9 2 'pseu pseudo/PSN',
10 3 '$end',
11 4 '$CNTRL',
12 5 'ispher=1,NOSYM=2,RUNFLG=3,noprop=4,',
13 6 '$END'/
14 C $file is not a valid namelist, but it still
15 C is parsed by the runtime
16 INTEGER*4 ISPHER,NOSYM,RUNFLG,NOPROP /-1 /
17 INTEGER I
18 NAMELIST /CNTRL/ ISPHER,NOSYM,RUNFLG,NOPROP
19 C make a unique datafile
20 OPEN(UNIT=9,STATUS='SCRATCH')
21 WRITE(9,*,ERR=100)(DL(I),I=1,7)
22 REWIND(9)
23 READ(9,NML=CNTRL,ERR=100)
24 CLOSE(9)
25 IF (ISPHER.NE.1.OR.NOSYM.NE.2.OR.RUNFLG.NE.3.OR.NOPROP.NE.4)THEN
26 CALL ABORT
27 ENDIF
28 C all is well at this point !!
29 STOP
30 100 PRINT*,'FILE ERROR(S)'
31 CALL ABORT
32 END