Fortran LTO and array descriptors.
Richard Biener
rguenther@suse.de
Sun Feb 4 11:42:00 GMT 2018
On February 3, 2018 6:17:15 PM GMT+01:00, Thomas Koenig <tkoenig@netcologne.de> wrote:
>I wrote:
>
>> - descriptor_dimension dim[r];\
>> + descriptor_dimension dim[];\
>> }
>
>> which works well
>
>... up to a point, there are numerous dtio failures
>when regression testing this.
>
>So, clearly not ready for prime time :-)
As far as I remember libgfortran has function signatures with the array descriptor with the maximum number of dimensions and the frontend generates aliased function decls with descriptors of the number of dimensions of the actual argument?
I believe the solution to the problem is to have the frontend emit only one declaration matching the library one and passing down pointers to descriptors that are accessed via the same full dimension type.
That can be achieved by either making all array descriptor instances full size or by doing _all_ actual accesses via that type. Like in pseudo C code:
Array2 two_dim;
((arrayFullDim *) & two_dim) - >data =... ;
The middle end supports this well enough by supporting placement new. I understand that really making all descriptors large would be a bigger ABI change or even non-conforming?
Richard.
> Thomas
More information about the Fortran
mailing list