Re: Big array indexes (Was: Integer types for 128-bit addressing)

From: Greg Lindahl (lindahl_at_pbm.com)
Date: 11/19/04


Date: 19 Nov 2004 13:37:22 -0800


>> What we need is ILP64, so that you can say:
>>
>> REAL A(1 000 000 000 000), B(1 000 000 000 000), C(1 000 000 000 000)
>> READ *, A, B, C
>> PRINT*, A*B+C
>> END

Note that you can do this today in most Fortran compilers by using a
compile-time -i8 switch, which leaves most 64-bit compilers in ILP64
mode.

>In this case, I think the savior and One True Way (TM) is F2003, which
>I understand supports array indexes of non-default kind.

I bet that you'll find that any 64-bit Fortran compiler which has a
default 32-bit integer has *some* means of using 64-bit array indexes,
e.g. by looking at the types the user is using as an index. This
leaves it up to the user to use a wide enough type, which is why
people seem to prefer to use -i8 to widen everything.

-- greg