PR26890 SIZE parameter interacts with same variable in IO list.

Jerry DeLisle jvdelisle@verizon.net
Tue Mar 28 04:03:00 GMT 2006


I need some input on this one.

The problem here is very easy to fix.  The *dtp-size is set to point to the SIZE 
parameter set in the READ or WRITE statement.  It is then used to accumulate the 
number of bytes transferred.  So if that variable also happens to be referenced 
in the the IO list, it gets clobbered when the I/O is initialized.

The easy fix is to use another integer variable to accumulate the size and then 
assign it to the SIZE parameter as part of the finalize_transfer.

The problem is, to do this I have to add a variable to the dtp structure.  This 
will effect compatibility with previous versions of the library.

Is this OK to proceed?

Also, I notice that at the end of the dtp structure there is the following:

       char pad[16 * sizeof (char *) + 34 * sizeof (int)];

What is this for?  Can I add an integer and reduce the size of this pad 
accordingly?  This sure is not documented anywhere.  And I do not see it used 
anywhere.

Jerry



More information about the Fortran mailing list