diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-17 14:15:24 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-17 14:15:24 +0000 |
commit | db3eb703be77202a18fb9cb9fe03651d1e3bfb8f (patch) | |
tree | c7f85acefa293bc83adb36c5df2e6e8a165c5eb0 /gcc/fortran/iso-c-binding.def | |
parent | 78e920c6baa0840a0aff398713722a3ffc953fdc (diff) | |
download | gcc-db3eb703be77202a18fb9cb9fe03651d1e3bfb8f.tar.gz |
* iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
REAL64 and REAL128.
* gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
gfc_get_real_kind_from_width_isofortranenv): New prototypes.
* iso-c-binding.def: Update definitions for the INT*_T,
INT_LEAST*_T and INT_FAST*_T named parameters.
* trans-types.c (get_typenode_from_name, get_int_kind_from_name,
gfc_get_real_kind_from_width_isofortranenv): New functions.
* gfortran.dg/c_kind_int128_test1.f03: Also test C_INT_FAST128_T.
* gfortran.dg/c_kind_int128_test2.f03: Update comment.
* gfortran.dg/c_kind_params.f90: Also test int_fast*_t.
* gfortran.dg/c_kinds.c: Add int_fast*_t arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147635 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/iso-c-binding.def')
-rw-r--r-- | gcc/fortran/iso-c-binding.def | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/gcc/fortran/iso-c-binding.def b/gcc/fortran/iso-c-binding.def index 98c3c982267..94c12fd09af 100644 --- a/gcc/fortran/iso-c-binding.def +++ b/gcc/fortran/iso-c-binding.def @@ -56,41 +56,44 @@ NAMED_INTCST (ISOCBINDING_LONG_LONG, "c_long_long", \ NAMED_INTCST (ISOCBINDING_INTMAX_T, "c_intmax_t", \ get_int_kind_from_node (intmax_type_node), GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_INTPTR_T, "c_intptr_t", \ - get_int_kind_from_node (ptr_type_node), GFC_STD_F2003) + get_int_kind_from_name (INTPTR_TYPE), GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_SIZE_T, "c_size_t", \ gfc_index_integer_kind, GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_SIGNED_CHAR, "c_signed_char", \ get_int_kind_from_node (signed_char_type_node), GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT8_T, "c_int8_t", get_int_kind_from_width (8), \ - GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT16_T, "c_int16_t", get_int_kind_from_width (16), \ - GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT32_T, "c_int32_t", get_int_kind_from_width (32), \ - GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT64_T, "c_int64_t", get_int_kind_from_width (64), \ - GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT8_T, "c_int8_t", \ + get_int_kind_from_name (INT8_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT16_T, "c_int16_t", \ + get_int_kind_from_name (INT16_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT32_T, "c_int32_t", \ + get_int_kind_from_name (INT32_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT64_T, "c_int64_t", \ + get_int_kind_from_name (INT64_TYPE), GFC_STD_F2003) /* GNU Extension. */ -NAMED_INTCST (ISOCBINDING_INT128_T, "c_int128_t", get_int_kind_from_width (128), \ - GFC_STD_GNU) +NAMED_INTCST (ISOCBINDING_INT128_T, "c_int128_t", \ + get_int_kind_from_width (128), GFC_STD_GNU) NAMED_INTCST (ISOCBINDING_INT_LEAST8_T, "c_int_least8_t", \ - get_int_kind_from_minimal_width (8), GFC_STD_F2003) + get_int_kind_from_name (INT_LEAST8_TYPE), GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_INT_LEAST16_T, "c_int_least16_t", \ - get_int_kind_from_minimal_width (16), GFC_STD_F2003) + get_int_kind_from_name (INT_LEAST16_TYPE), GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_INT_LEAST32_T, "c_int_least32_t", \ - get_int_kind_from_minimal_width (32), GFC_STD_F2003) + get_int_kind_from_name (INT_LEAST32_TYPE), GFC_STD_F2003) NAMED_INTCST (ISOCBINDING_INT_LEAST64_T, "c_int_least64_t", \ - get_int_kind_from_minimal_width (64), GFC_STD_F2003) + get_int_kind_from_name (INT_LEAST64_TYPE), GFC_STD_F2003) /* GNU Extension. */ NAMED_INTCST (ISOCBINDING_INT_LEAST128_T, "c_int_least128_t", \ get_int_kind_from_minimal_width (128), GFC_STD_GNU) -/* TODO: Implement c_int_fast*_t. Depends on PR 448. */ -NAMED_INTCST (ISOCBINDING_INT_FAST8_T, "c_int_fast8_t", -2, GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT_FAST16_T, "c_int_fast16_t", -2, GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT_FAST32_T, "c_int_fast32_t", -2, GFC_STD_F2003) -NAMED_INTCST (ISOCBINDING_INT_FAST64_T, "c_int_fast64_t", -2, GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT_FAST8_T, "c_int_fast8_t", \ + get_int_kind_from_name (INT_FAST8_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT_FAST16_T, "c_int_fast16_t", \ + get_int_kind_from_name (INT_FAST16_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT_FAST32_T, "c_int_fast32_t", \ + get_int_kind_from_name (INT_FAST32_TYPE), GFC_STD_F2003) +NAMED_INTCST (ISOCBINDING_INT_FAST64_T, "c_int_fast64_t", \ + get_int_kind_from_name (INT_FAST64_TYPE), GFC_STD_F2003) /* GNU Extension. */ NAMED_INTCST (ISOCBINDING_INT_FAST128_T, "c_int_fast128_t", -2, GFC_STD_GNU) |