This is the mail archive of the gcc-patches@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]

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


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


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