ABI breakages in 4.4

Richard Guenther richard.guenther@gmail.com
Sat Sep 13 16:21:00 GMT 2008


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?
>
> a) Change the library number and thus be not backward compatible. (This
> is likely needed for the next version again as we need to change the
> internal array representation to fix some bugs, which should then be
> compatible to the new C interoperability TR.)
>
> b) Create special 4.3 versions of the procedure, making use of the
> versioned symbols.
>
> c) Something else?

c) Change passing the enlarged struct in such a way that it can
be distinguished from old ones, such as passing an invalid known
value in one of the old fields, duplicating it in the new parts.

Otherwise b) is what should be done - but this is not possible on
systems that do not allow symbol-versioning.  Which leads to ...

d) Change the name of the functions that get the IO struct passed
and keep the old variants with the old name.  Though I realize this
may involve a lot of functions...

Richard.

> Somehow, the interwoven nature of Fortran with its library makes it
> difficult to maintain backwards compatibility without replicating large
> parts of the code -- at least as soon as structs are involved. On the
> other hand, having libgfortran backward compatibility is a useful goal,
> e.g. to use AMD's ACML with newer gfortran compilers. So far we every
> major version had an incompatible library: 4.0, 4.1, 4.2, 4.3 and 4.4 :-(
>
> Tobias
>



More information about the Fortran mailing list