[J3] BIND(F)?
Jeff Hammond
jehammond at nvidia.com
Tue Jun 28 13:09:30 UTC 2022
> On 27Jun 2022, at 11:31 PM, Thomas König <tk at tkoenig.net> wrote:
>
> External email: Use caution opening links or attachments
>
>
> On 27.06.22 21:12, Jeff Hammond wrote:
>> Do I understand you correctly that needing to change ABI would cause the
>> end of gfortran?
>
> Not only the ABI, but also the whole library. Just consider I/O - that
> would just have to work if the main program written in, let's say,
> ifort, writes out something with ADVANCE="no" and the called library
> writes the rest of the record.
>
Okay, that’s a concrete example where interoperability is impractical. But we could solve easier problems and leave this as unsolved, and still make life better for users.
For example, math libraries do not need to do I/O*, but are a very important use case in Fortran applications. If we merely solved interoperability for arrays of built-in datatypes, it would be quite useful.
* That XERBLA exists instead of a more more form of error handling is not proof that this I/O necessary.
Another example is strings. How does one make a portable library that takes string arguments? Is it really a project-ending disaster to standardize the calling convention for strings?
> So yes, I would say that writing a new library from scratch for
> gfortran would not be feasible.
>
> However, if you think that this is easy, please feel free to rip out
> whatever you have in flang and replace it with a gfortran - compatible
> library. The interface isn't copyrighted (or copylefted, for that
> matter).
I am not suggesting that this is easy. I am instead trying to suggest that we consider something other than your fatalistic dichotomy of doing nothing or breaking absolutely everything. Are you willing to consider that there might be specific things we could do that would make the Fortran ecosystem better that do not require the death of gfortran?
Jeff
More information about the J3
mailing list