Maximum rank - Fortran 2008

Tobias Burnus burnus@net-b.de
Fri May 10 12:27:00 GMT 2013


Romeu Braz Pereira Gomes Filho wrote:
> I would like to know when gfortran will suport a maximum rank of 15 for arrays.

That's still unclear. The internal representation of arrays (array 
descriptor, dope vector) uses 3 bits to represent the rank, which allows 
for 2**3 = 8 values, which are used for rank == 0 (scalar) to rank == 7. 
Thus, supporting rank > 7 arrays is not possible without incompatible 
changes.

A new array descriptor is currently developed, but many aspects of the 
internal representation have to be changed, it will take a while. The 
internal representation of that array is documented in ISO/IEC Technical 
Specification (TS) 29113:2012, 
http://gcc.gnu.org/wiki/GFortranStandards#TS_29113_Further_Interoperability_of_Fortran_with_C

My guess is that the new descriptor will either be used in GCC 4.9, 
which could be in two months. Or in GCC 4.10 if it will not ready in time.

If you want to try it, you could build GCC/gfortran from the Fortran-Dev 
branch, which supports rank 15 arrays. There are still some issues, but 
most features should work.

Tobias



More information about the Fortran mailing list