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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.7.4, 4.8.3, 4.9.0

--- Comment #1 from kargl at gcc dot gnu.org ---
program namelistout
   implicit none
   character :: mystring*5 = 'tue'
   namelist /mylist/ mystring
   open(unit=10,file='junk1.dat',delim='apostrophe')
   write(10, mylist)
   close(10)
   open(unit=10,file='junk2.dat',delim='quote')
   write(10, mylist)
   close(10)
   open(unit=10,file='junk3.dat',delim='none')
   write(10, mylist)
   close(10)
   open(unit=10,file='junk4.dat')
   write(10, mylist)
   close(10)
end program

% gfc4x -o z g.f90 && ./z
% cat junk?.dat
&MYLIST
 MYSTRING='tue  ',
 /
&MYLIST
 MYSTRING="tue  ",
 /
&MYLIST
 MYSTRING="tue  ",
 /
&MYLIST
 MYSTRING="tue  ",
 /

junk3.dat and junk4.dat should contain
&MYLIST
 MYSTRING=tue,
 /


10.11.4.2   Namelist output editing

Values in namelist output records are edited as for
list-directed output (10.10.4).

10.10.4
...
Character sequences produced when the delimiter mode has a
value of NONE
  . are not delimited by apostrophes or quotation marks,
  . are not separated from each other by value separators,
  · have each internal apostrophe or quotation mark
    represented externally by one apostrophe or quotation
    mark, and
  · have a blank character inserted by the processor at the
    beginning of any record that begins with the continuation
    of a character sequence from the preceding record.

Character sequences produced when the delimiter mode has a
value of QUOTE are delimited by quotes, are preceded and
followed by a value separator, and have each internal quote
represented on the external medium by two contiguous quotes.

Character sequences produced when the delimiter mode has a
value of APOSTROPHE are delimited by apostrophes, are preceded
and followed by a value separator, and have each internal
apostrophe represented on the external medium by two contiguous
apostrophes.

9.5.6.8   DELIM= specifier in the OPEN statement

The scalar-default-char-expr shall evaluate to APOSTROPHE, QUOTE,
or NONE.  The DELIM= specifier is permitted only for a connection
for formatted input/output.  It specifies the delimiter mode
(9.6.2.8) for list-directed (10.10.4) and namelist (10.11.4.2)
output for the connection.  This mode has no effect on input.  It
is a changeable mode (9.5.2).  If this specifier is omitted in an
OPEN statement that initiates a connection, the default value is NONE.

Reply via email to