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 #2 from sgk at troutmask dot apl dot washington dot edu  2007-09-18 18:02 -------
Subject: Re:  data initialization with more than 2**32 elements

On Tue, Sep 18, 2007 at 05:56:36PM -0000, kargl at gcc dot gnu dot org wrote:
> 
> The problem is found in decl.c(top_val_list) at lines 404-411, which
> are 
> 
>           signed int tmp;
>           msg = gfc_extract_int (expr, &tmp);
>           gfc_free_expr (expr);
>           if (msg != NULL)
>             {
>               gfc_error (msg);
>               return MATCH_ERROR;
>             }
> 
> gfc_extract_int is trying to put 4294967296_8 into a signed int.
> This probably needs to be changed to accommodate the type of
> an array index.

For completeness, the line 412 is 'tail->repeat = tmp'
where tail->repeat is an unsigned int.


-- 


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]