[Bug fortran/14976] New: [gfortran] .space is wrong

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 16 16:06:00 GMT 2004


Try to compile the following program you will see that a .space is wrong and will as 
complain and not assemble the code.  g77 does the right thing.  This testcase is from PR 
12884.

       IMPLICIT NONE
C properly handle a "/" in a $<NAME> $END namelist
C pr12884 --
C error in reading a namelist when it is preceded by a line with a SLASH
C
       CHARACTER*80 DL(7)
       DATA DL /'$file',
     1          'oms omsmc.i2',
     2          'pseu pseudo/PSN',
     3          '$end',
     4          '$CNTRL',
     5          'ispher=1,NOSYM=2,RUNFLG=3,noprop=4,',
     6          '$END'/
C $file is not a valid namelist, but it still
C is parsed by the runtime
       INTEGER*4 ISPHER,NOSYM,RUNFLG,NOPROP /-1 /
       INTEGER I
       NAMELIST /CNTRL/ ISPHER,NOSYM,RUNFLG,NOPROP
C make a unique datafile
       OPEN(UNIT=9,STATUS='SCRATCH')
       WRITE(9,*,ERR=100)(DL(I),I=1,7)
       REWIND(9)
       READ(9,NML=CNTRL,ERR=100)
       CLOSE(9)
       IF (ISPHER.NE.1.OR.NOSYM.NE.2.OR.RUNFLG.NE.3.OR.NOPROP.NE.4)THEN
           CALL ABORT
       ENDIF
C all is well at this point !!
       STOP
 100   PRINT*,'FILE ERROR(S)'
       CALL ABORT 
       END

-- 
           Summary: [gfortran] .space is wrong
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14976



More information about the Gcc-bugs mailing list