[Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Jun 28 21:34:00 GMT 2006


On Wed, Jun 28, 2006 at 08:21:12AM +0200, FX Coudert wrote:
> 
> I don't have time right now to review that patch. Here are my comments:

Jerry, I'm in the same boat with fx, but I  should be able 
to read through the code Saturday.  Perhaps, we can get
in touch on IRC in the afternoon.

> >This patch 
> >borrows code from trans-types.c to determine whether or not a target 
> >supports integer 8 or not.  A new function is added to make this 
> >determination.
> 
> I think we should use a constant to store that integer kind defined as 
> "8 if integer(8) exists and 4 otherwise", to avoid calling a function 
> each time we need it. We already have a constant gfc_max_integer_kind in 
> place, we could either
> 
>  - use that gfc_max_integer_kind, because it is also known from the 
> library, as GFC_INTEGER_LARGEST
> 
>  - use similar code than the one defining gfc_max_integer_kind to 
> define gfc_large_integer_kind as "8 if possible, 4 otherwise"
> 

You definitely don't want to use gfc_max_integer_kind.  This
is integer*16 on most (if not all) 64 bit architectures.  I 
think we should go with the second option, but with a more
descriptive name, perhaps, gfc_record_integer_kind.

-- 
Steve



More information about the Gcc-patches mailing list