diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-01-13 16:41:13 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-01-13 16:41:13 +0100 |
commit | 8395e28bbfa2e57acf4a31d3b2ca6e0f1be6a962 (patch) | |
tree | b2d112c6268ab4cc0f85b8cc3a84f01cc6c935fc | |
parent | aabb90e5ad703efbfc7a6c69c08817c2e2ccfb13 (diff) | |
download | gcc-8395e28bbfa2e57acf4a31d3b2ca6e0f1be6a962.zip gcc-8395e28bbfa2e57acf4a31d3b2ca6e0f1be6a962.tar.gz gcc-8395e28bbfa2e57acf4a31d3b2ca6e0f1be6a962.tar.bz2 |
re PR fortran/51842 (fortran fails if ssize_t is 32-bit on 64-bit host)
2012-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/51842
* fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
instead of a signed int of size POINTER_SIZE for
gfc_index_integer_kind.
From-SVN: r183154
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0005161..9a38216 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2012-01-13 Tobias Burnus <burnus@net-b.de> + + PR fortran/51842 + * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE + instead of a signed int of size POINTER_SIZE for + gfc_index_integer_kind. + 2012-01-12 Tobias Burnus <burnus@net-b.de> PR fortran/36755 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index d643c2e..f817a12 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -576,8 +576,8 @@ gfc_init_kinds (void) gfc_default_character_kind = gfc_character_kinds[0].kind; gfc_character_storage_size = gfc_default_character_kind * 8; - /* Choose the integer kind the same size as "void*" for our index kind. */ - gfc_index_integer_kind = POINTER_SIZE / 8; + gfc_index_integer_kind = get_int_kind_from_name (PTRDIFF_TYPE); + /* Pick a kind the same size as the C "int" type. */ gfc_c_int_kind = INT_TYPE_SIZE / 8; |