This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/56743] New: Namelist bug with comment and no blank


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

             Bug #: 56743
           Summary: Namelist bug with comment and no blank
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


Reduced test case (inspired by the one in PR 56660), originally reported by Kai
Gallmeister:


integer :: value = 100
namelist /nml/ value

write (*, nml=nml)

open (99, file='nml.dat', status="replace")
write(99,*) "&nml"
write(99,*) "  value=1!11"
write(99,*) "/"

rewind(99)
read (99, nml=nml)
write (*, nml=nml)

close (99, status="delete")

end 



Output with 4.3, 4.7 and trunk (haven't tried other versions):

&NML
 VALUE=        100,
 /
&NML
 VALUE=        100,
 /

Expected output:

&NML
 VALUE=        100,
 /
&NML
 VALUE=          1,
 /


The fact that there is no blank between the number and the comment should not
make any difference, right? Unfortunately it does ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]