ABI breakages in 4.4

Richard Guenther richard.guenther@gmail.com
Sat Sep 13 19:11:00 GMT 2008


On Sat, Sep 13, 2008 at 8:53 PM, Jerry DeLisle <jvdelisle@verizon.net> wrote:
> Richard Guenther wrote:
>>
>> On Sat, Sep 13, 2008 at 5:00 PM, Tobias Burnus <burnus@net-b.de> wrote:
>>>
>>> Thomas Koenig wrote:
>>>>>
>>>>> just a heads-up: we have a couple of ABI breakages where 4.3-compiled
>>>>> programs don't work correctly with the 4.4 library, namely PR 37498
>>>
>>> The problem is that the struct passed for I/O has been modified to allow
>>> Fortran 2003 features (UTF-8, rounding, decimal comma etc.). The problem
>>> is that in libgfortran the new struct is expected, but gfortran 4.3
>>> programs only passes a shorter struct. In the PR this causes that values
>>> in an unrelated array are overwritten.
>>>
>>> Do you have an idea how this should be solved?
>>>
>
> Move the F2003 related items inside st_parameter_dt.u.p where we already
> have the padding.  We may have to expand the padding.  We then have to
> adjust the front end where we build these structures.  Essentially the top
> half of st_parameter.dt will then match exactly 4.3 again.
>
> Another option us to move the items to just after the union.  The items in
> question are:
>
>  GFC_IO_INT *id;
>  GFC_IO_INT pos;
>  CHARACTER1 (asynchronous);
>  CHARACTER2 (blank);
>  CHARACTER1 (decimal);
>  CHARACTER2 (delim);
>  CHARACTER1 (pad);
>  CHARACTER2 (round);
>  CHARACTER1 (sign);
>
>
> Does this sound workable?
>
> On the library side the changes are fairly mechanical.  I will need help
> with the frontend parts.

Looking at the differences betwee 4.3 and 4.4 for st_parameter_dt moving the
new fields after (or into) the union looks like it can work.  There
seem to be also
unused bits in the bitfield for which one could be used to indicate
the new fields.

I didn't look if there are other structures that need adjustment apart from
st_parameter_dt.

Richard.



More information about the Fortran mailing list