[PATCH, fortran] Interoperability with C int128_t types
Sa Liu
SALIU@de.ibm.com
Wed Apr 16 10:01:00 GMT 2008
And also the ChangeLogs and texi changes.
Index: gcc/gcc/ChangeLog
===================================================================
--- gcc.orig/gcc/ChangeLog
+++ gcc/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15 Sa Liu <saliu@de.ibm.com>
+ * testsuite/gfortran.dg/c_kind_int128_test1.f03: New.
+ * testsuite/gfortran.dg/c_kind_int128_test2.f03: New.
+
2008-04-15 Doug Kwan <dougkwan@google.com>
* dwarf2asm.c (dw2_assemble_integer): Cast to unsigned
HOST_WIDE_INT
Index: gcc/gcc/fortran/ChangeLog
===================================================================
--- gcc.orig/gcc/fortran/ChangeLog
+++ gcc/gcc/fortran/ChangeLog
@@ -1,3 +1,22 @@
+2008-04-15 Sa Liu <saliu@de.ibm.com>
+ * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
+ All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
+ c_int128_t, c_int_least128_t and c_int_fast128_t are added as
+ GNU extensions.
+ * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
+ to macro NAMED_INTCST.
+ * symbol.c (gnu_only_isocbinding): New helper funciton to check
types
+ only supported as GNU extensions.
+ (generate_isocbinding_symbol): Do not generate GNU extension
symbols
+ if std=f2003. Add new parameter to NAMED_INTCST.
+ * module.c (use_iso_fortran_env_module): Add new parameter to
+ NAMED_INTCST.
+ * gfortran.h: Add new parameter to NAMED_INTCST.
+ * trans-types.c (init_c_interop_kinds): Add new parameter to
+ NAMED_INTCST.
+ * intrinsic.texi: Documented new types C_INT128_T,
C_INT_LEASE128_T
+ and C_INT_FAST128_T.
+
2008-04-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35864
Index: gcc/gcc/fortran/intrinsic.texi
===================================================================
--- gcc.orig/gcc/fortran/intrinsic.texi
+++ gcc/gcc/fortran/intrinsic.texi
@@ -11021,7 +11021,7 @@ Identifies the preconnected unit identif
@section @code{ISO_C_BINDING}
@table @asis
@item @emph{Standard}:
-Fortran 2003 and later
+Fortran 2003 and later, GNU extensions
@end table
The following intrinsic procedures are provided by the module; their
@@ -11042,6 +11042,8 @@ Fortran currently does not support the @
parameters (marked by an asterisk (@code{*}) in the list below).
The @code{C_INT_FAST...} parameters have therefore the value @math{-2}
and cannot be used as KIND type parameter of the @code{INTEGER} type.
+Note that the 128-bit integers @code{C_INT128_T, C_INT_LEAST128_T,
+C_INT_FAST128_T} are only GNU extensions and not supported by Fortran
2003.
@multitable @columnfractions .15 .35 .35
@item Fortran Type @tab Named constant @tab C type
@@ -11055,14 +11057,17 @@ and cannot be used as KIND type paramete
@@ -11055,14 +11057,17 @@ and cannot be used as KIND type paramete
@item @code{INTEGER}@tab @code{C_INT16_T} @tab @code{int16_t}
@item @code{INTEGER}@tab @code{C_INT32_T} @tab @code{int32_t}
@item @code{INTEGER}@tab @code{C_INT64_T} @tab @code{int64_t}
+@item @code{INTEGER}@tab @code{C_INT128_T} @tab @code{int128_t}
@item @code{INTEGER}@tab @code{C_INT_LEAST8_T} @tab @code{int_least8_t}
@item @code{INTEGER}@tab @code{C_INT_LEAST16_T} @tab @code{int_least16_t}
@item @code{INTEGER}@tab @code{C_INT_LEAST32_T} @tab @code{int_least32_t}
@item @code{INTEGER}@tab @code{C_INT_LEAST64_T} @tab @code{int_least64_t}
+@item @code{INTEGER}@tab @code{C_INT_LEAST128_T} @tab
@code{int_least128_t}
@item @code{INTEGER}@tab @code{C_INT_FAST8_T}* @tab @code{int_fast8_t}
@item @code{INTEGER}@tab @code{C_INT_FAST16_T}* @tab @code{int_fast16_t}
@item @code{INTEGER}@tab @code{C_INT_FAST32_T}* @tab @code{int_fast32_t}
@item @code{INTEGER}@tab @code{C_INT_FAST64_T}* @tab @code{int_fast64_t}
+@item @code{INTEGER}@tab @code{C_INT_FAST128_T}* @tab
@code{int_fast128_t}
@item @code{INTEGER}@tab @code{C_INTMAX_T} @tab @code{intmax_t}
@item @code{INTEGER}@tab @code{C_INTPTR_T} @tab @code{intptr_t}
@item @code{REAL} @tab @code{C_FLOAT} @tab @code{float}
More information about the Fortran
mailing list