This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, fortran at gcc dot gnu dot org
- Date: Wed, 28 Jun 2006 00:14:26 -0700
- Subject: Re: [Patch, fortran] PR25289 Cannot handle record numbers large than huge(0_4)
- References: <A7E4CB800B73A2409E113012513E03944CDFA8@EX1V.rl.gov> <44A20047.1010202@verizon.net> <44A21FD8.4090706@gmail.com>
FX Coudert wrote:
Hi Jerry,
I don't have time right now to review that patch. Here are my comments:
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"
I like the concept. However, the reason I made a new function to compute the
size is because these variables:
int gfc_default_integer_kind;
int gfc_max_integer_kind;
+int gfc_large_integer_kind;
int gfc_default_real_kind;
int gfc_default_double_kind;
int gfc_default_character_kind;
Are not visible to trans-io.c where we need to use them. So we need to move
these to someplace like trans-types.h and make them static. Am I making sense
or am I missing something?
Jerry