This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31244] data initialization with more than 2**32 elements



------- Comment #4 from sgk at troutmask dot apl dot washington dot edu  2007-09-18 19:26 -------
Subject: Re:  data initialization with more than 2**32 elements

On Tue, Sep 18, 2007 at 07:16:42PM -0000, sgk at troutmask dot apl dot
washington dot edu wrote:
> 
> Ugh.  I have a patch that would allow a repeat count of
> 2**32-1.  For this program:
> 
>   program main
>   integer(kind=1), dimension(4294967294_8) :: i
>   data i /4294967294_8 * 1_1/
>   print *,i(1)
>   end program main
> 
> and 'gfc4x -o z -O p.f90', I see 
> 
> 51879 sgk           1 121    0   554M   554M RUN    1   5:48 92.24% as
> 
> in top(1).  Do we really want to support this large of a repeat count?
> 

Ugh**2.

If I'm not mistaken, this will create an executable with
4 GB of static data in it.  I think we should but a sane
limit on the value.  Btw,  I'm sitting at

51879 sgk           1 122    0  1302M  1304M CPU1   1  14:17 93.41% as
51878 sgk           1  -8    0 17684K 12924K pipewr 0   7:58 48.78% f951

in top(1).  So, it memory grows to rough 4GB, then it will take
about an hour to compile this program.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31244


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]