This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Support for large kinds in front-end and library
Yes, I think we should restrict the kinds to REAL(4)
and REAL(8) in 4.0.
If nobody objects, I will commit the following patch after due testing.
This does restrict the real kinds to float/double C types.
FX
2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* trans-types.c (gfc_init_kinds): Only allow real kinds
corresponding to C float and double types.
Index: gcc/fortran/trans-types.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-types.c,v
retrieving revision 1.37.10.6
diff -u -3 -p -r1.37.10.6 trans-types.c
--- gcc/fortran/trans-types.c 4 Jun 2005 20:59:43 -0000 1.37.10.6
+++ gcc/fortran/trans-types.c 3 Oct 2005 18:09:13 -0000
@@ -150,6 +150,12 @@ gfc_init_kinds (void)
if (!targetm.scalar_mode_supported_p (mode))
continue;
+ /* Only let float/double go through since the library does not
+ support other floating point types. */
+ if (mode != TYPE_MODE (float_type_node)
+ && mode != TYPE_MODE (double_type_node))
+ continue;
+
/* Let the kind equal the precision divided by 8, rounding up. Again,
this insulates the programmer from the underlying byte size.