PR26890 SIZE parameter interacts with same variable in IO list.
Jerry DeLisle
jvdelisle@verizon.net
Tue Mar 28 05:17:00 GMT 2006
Paul Thomas wrote:
>
> This is, of course, why the construct is non-standard (incidentally,
> have you checked my assertion of this?).
>
Your example works fine with ifc. With gfortran the variable is set to zero in
data_transfer_init
>>
>> 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.
>
>
> I just suggested that on Bugzilla.
>
Our mail is crossing the ocean simultaneously.
>>
>>
>> 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.
>
>
> Does it have to be an extra field on the dtp structure? Surely, a static
> variable would do the job, wouldn't it?
>
Using a static variable might lead to non thread safe behavior. Thats the main
reason for the dtp structure. Incidentally, the internal_unit is a static
structure and this is why we have pr26766. I will be fixing that soon.
>>
>> 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.
>
>
> If it is not used, it could be used for temporaries. It's name imples
> that it is being used for alignment purposes but the space allocated
> belies that.
>
I think I will try using this pad area and see what happens.
Jerry
More information about the Fortran
mailing list