This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)
Steve Kargl wrote:
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.
Yes, I agree we should not use gfc_max_integer_kind. I have the second option
working with gfc_record_int_kind.
I will do some more testing here. (I found the extern declarations in
gfortran.h, doh!)
Steve, I will look for you on IRC if I can Saturday.
Jerry