[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-07 Thread urbanjost at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

--- Comment #20 from urbanjost at comcast dot net 2010-10-07 09:35:20 UTC ---
Thanks!

- Original Message - 
From: "jvdelisle at gcc dot gnu.org" 
To: 
Sent: Wednesday, October 06, 2010 10:45 PM
Subject: [Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST 
group to internal file


> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710
>
> Jerry DeLisle  changed:
>
>   What|Removed |Added
> 
> Status|ASSIGNED|RESOLVED
> Resolution||FIXED
>
> --- Comment #19 from Jerry DeLisle  
> 2010-10-07 02:44:59 UTC ---
> Fixed on trunk, 4.5, and 4.4.  Closing  Thanks for bug report.
>
> -- 
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> --- You are receiving this mail because: ---
> You reported the bug.
>


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-06 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

Jerry DeLisle  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #19 from Jerry DeLisle  2010-10-07 
02:44:59 UTC ---
Fixed on trunk, 4.5, and 4.4.  Closing  Thanks for bug report.


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-06 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

--- Comment #18 from Jerry DeLisle  2010-10-07 
02:38:04 UTC ---
Author: jvdelisle
Date: Thu Oct  7 02:38:00 2010
New Revision: 165080

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165080
Log:
2010-10-06  Jerry DeLisle  

Backport from mainline
PR libfortran/45710
* gfortran.dg/namelist_65.f90: New test.

Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_65.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-06 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

--- Comment #17 from Jerry DeLisle  2010-10-07 
02:31:18 UTC ---
Author: jvdelisle
Date: Thu Oct  7 02:31:14 2010
New Revision: 165079

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165079
Log:
2010-10-06  Jerry DeLisle  

Backport from mainline:
PR libfortran/45710
* io/write.c (namelist_write_newline): Pad character array internal
unit records with spaces.

Modified:
branches/gcc-4_4-branch/libgfortran/ChangeLog
branches/gcc-4_4-branch/libgfortran/io/write.c


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-06 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

--- Comment #16 from Jerry DeLisle  2010-10-07 
01:24:40 UTC ---
Author: jvdelisle
Date: Thu Oct  7 01:24:36 2010
New Revision: 165078

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165078
Log:
2010-10-06  Jerry DeLisle  

Backport from mainline
PR libfortran/45710
* gfortran.dg/namelist_65.f90: New test.

Added:
branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/namelist_65.f90
Modified:
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-10-06 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710

--- Comment #15 from Jerry DeLisle  2010-10-07 
01:20:28 UTC ---
Author: jvdelisle
Date: Thu Oct  7 01:20:23 2010
New Revision: 165077

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165077
Log:
2010-10-06  Jerry DeLisle  

Backport from mainline:
PR libfortran/45710
* io/write.c (namelist_write_newline): Pad character array internal
unit records with spaces.

Modified:
branches/gcc-4_5-branch/libgfortran/ChangeLog
branches/gcc-4_5-branch/libgfortran/io/write.c


[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #14 from jvdelisle at gcc dot gnu dot org  2010-09-23 01:43 
---
Fixed on trunk.  I will backport to 4.5 and 4.4 except the portion dealing with
char4 internal units which is not supported on these earlier releases. Backport
will occur in a few days or weeks.  I would like to give some burnin time on
trunk.


-- 


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



[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #13 from jvdelisle at gcc dot gnu dot org  2010-09-23 01:28 
---
Subject: Bug 45710

Author: jvdelisle
Date: Thu Sep 23 01:28:39 2010
New Revision: 164548

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164548
Log:
2010-09-22  Jerry DeLisle  

PR libfortran/45710
* gfortran.dg/namelist_65.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/namelist_65.f90
Modified:
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #12 from jvdelisle at gcc dot gnu dot org  2010-09-23 00:53 
---
Subject: Bug 45710

Author: jvdelisle
Date: Thu Sep 23 00:53:15 2010
New Revision: 164543

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164543
Log:
2010-09-22  Jerry DeLisle  

PR libfortran/45710
* io/write.c (namelist_write_newline): Pad character array internal
unit records with spaces.

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write.c


-- 


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



[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-21 Thread urbanjost at comcast dot net


--- Comment #11 from urbanjost at comcast dot net  2010-09-22 05:19 ---
Subject: Re:  Adjust format and padding for WRITE of NAMELIST group to internal
file

Great! Although I (too?) find the f2008 reference a little confusing on 
whether the line beginning the NAMELIST output
needs to have column 1 clear, I found the XL IBM on-line Fortran manual 
shows the & in column two; and the case where
the output might all be on one line is clearer if column 1 is clear; and the 
history behind column one being special for ASA carriage-control  (still 
available on VMS/OpenVMS and via commands like asa(1), even if no longer 
common) made me lean towards asking for it to be shifted (along with the 
cited line from the f2008 reference). Plus, it is clear that column 1 can be 
clear if desired (Arbitrary numbers of spaces are allowed to precede the & 
the way I read the standard). So I would still prefer the & to start in 
column 1, but I can understand someone not
being convinced that it is required; and it does seem more asthetically 
pleasing in column 1.

Since it is stated in the standard that column one is used by a continued 
character string, allowing it to have the & is not going to complicate
things much further; and the standard doesn't specify many other things in a 
way that I'm sure about the meaning yet (should output be "wrapped" to the 
length of the internal file record lengths when a string exceeds the 
internal file record
 length or is it OK to cast an error indicating the record length is 
exceeded;  exactly which delimiter is the default for strings; is "stream 
I/O" format supported for internal files; ...?) I can see
either interpretation at this point.

Adding  the record with blanks solves a real issue I encountered; and
 the initial problem I saw was already addressed in 4.6.0 so I'm happy and 
just want to say "Thanks!".

_
NAMELIST output example from the IBM manual (column 1 is not used)
1 2 3 4
1...+0+0+0+0
 &NL1
 I=12046, J=12047, C=BACON, SMITH=20, John Smith
 /
_
- Original Message - 
From: "jvdelisle at gcc dot gnu dot org" 
To: 
Sent: Tuesday, September 21, 2010 10:52 PM
Subject: [Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST 
group to internal file


>
>
> --- Comment #10 from jvdelisle at gcc dot gnu dot org  2010-09-22 
> 02:52 ---
> Created an attachment (id=21860)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21860&action=view)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21860&action=view)
> Tentative patch, not regression tested
>
> Our interpretation of this:
>
> 3 An ampersand character followed immediately by a namelist-group-name
>  will be produced by namelist formatting at the start of the first
>  output record to indicate which particular group of data objects is
>  being output. A slash is produced by namelist formatting to indicate
>  the end of the namelist formatting.
>
> Is no space on the first line.  I would like to leave it that way for now.
> Attached patch fixes the padding.
>
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45710
>
> --- You are receiving this mail because: ---
> You reported the bug, or are watching the reporter.
> 


-- 


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



[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-21 Thread jvdelisle at gcc dot gnu dot org


--- Comment #10 from jvdelisle at gcc dot gnu dot org  2010-09-22 02:52 
---
Created an attachment (id=21860)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21860&action=view)
Tentative patch, not regression tested

Our interpretation of this:

3 An ampersand character followed immediately by a namelist-group-name
  will be produced by namelist formatting at the start of the first
  output record to indicate which particular group of data objects is
  being output. A slash is produced by namelist formatting to indicate
  the end of the namelist formatting.

Is no space on the first line.  I would like to leave it that way for now. 
Attached patch fixes the padding.


-- 


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



[Bug fortran/45710] Adjust format and padding for WRITE of NAMELIST group to internal file

2010-09-21 Thread jvdelisle at gcc dot gnu dot org


--- Comment #9 from jvdelisle at gcc dot gnu dot org  2010-09-22 02:26 
---
Changed summary of this bug to reflect that I will be adjusting the padding of
internal unit character arrays and initial space on some lines.  On my system I
see:

&NL1 JUNK
space A=  1.000,JUNK
space B=  2.000,JUNK
space C=  3.000,JUNK
space /  

I am not sure on the no space on the first line. I will pad out the strings
with blanks.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|WRITE of NAMELIST group to  |Adjust format and padding
   |internal file contains  |for WRITE of NAMELIST group
   |newline characters  |to internal file


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