bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Large size array problem


From: Cserzo Miklos
Subject: Re: Large size array problem
Date: Fri, 13 Jun 2003 10:31:55 +0200 (CEST)


On Thu, 12 Jun 2003, Stepan Kasal wrote:

Hi Stepan,

> well, I'd guess that there is no trick: you are right that you have true
> 64bit world.
>
> The next question is whether the Pascal is ready for 64 bits.
>
> The asm you posted says:
>
>         .local  I
>         .common I,4,4
>         .local  J
>         .common J,4,4
>         .local  N
>         .common N,2399999996,4
>
> My naive interpretation is that the integers are 4 bytes long, which means
> 32bit variables.  So it looks as if Pascal were thinking in 32bits.

this is not the point. The generated assembler source lists the size of
the array correctly. The problem is at the 'gas' end as it stores the
value in a 32 bit signed integer that overflows.

> Perhaps it also calls the gas for the 32bit target.

No, the correct switches are passed. It even generates a 64 bit executable
(reported by 'file') if I lower the array size below the limit.

After all I have two problems. It is fair to have an upper limit for the
array size, but:

 - the error message from 'gas' is misleading when this limit is crossed
(minor bug);

 - this limit - apparently 2^31 - is fair in the 32 bit environment but
unreasonably restrictive in the 64 bit world. If 'gas' wants to become a
true 64 bit tool this limit should be higher in my opinion. I don't know
if it is possible and what amount of work does it mean. It's up to your
consideration.

Cheers,

miklos





reply via email to

[Prev in Thread] Current Thread [Next in Thread]