diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-10 19:43:49 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-10 19:43:49 +0000 |
commit | 37f21d1fad625bd5937cfcaada295a9db9c6fd62 (patch) | |
tree | a70d4b968b6a34668f485e3a39033f4dc68cf53c /gcc/lto/lto.c | |
parent | 42476750535bfac998463b3fb26046911d252dce (diff) | |
download | gcc-37f21d1fad625bd5937cfcaada295a9db9c6fd62.tar.gz |
* tree.c (type_with_interoperable_signedness): New.
(gimple_canonical_types_compatible_p): Use it.
* tree.h (type_with_interoperable_signedness): Declare
* lto.c (hash_canonical_type): Honor
type_with_interoperable_signedness.
* gfortran.dg/lto/bind_c-2_0.f90: New testcase.
* gfortran.dg/lto/bind_c-2_1.c: New testcase.
* gfortran.dg/lto/bind_c-3_0.f90: New testcase.
* gfortran.dg/lto/bind_c-3_1.c: New testcase.
* gfortran.dg/lto/bind_c-4_0.f90: New testcase.
* gfortran.dg/lto/bind_c-4_1.c: New testcase.
* gfortran.dg/lto/bind_c-5_0.f90: New testcase.
* gfortran.dg/lto/bind_c-5_1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228680 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 4bb0aafcb7d..76f8e078006 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -288,6 +288,7 @@ static hashval_t hash_canonical_type (tree type) { inchash::hash hstate; + enum tree_code code; /* We compute alias sets only for types that needs them. Be sure we do not recurse to something else as we can not hash incomplete @@ -299,7 +300,8 @@ hash_canonical_type (tree type) smaller sets; when searching for existing matching types to merge, only existing types having the same features as the new type will be checked. */ - hstate.add_int (tree_code_for_canonical_type_merging (TREE_CODE (type))); + code = tree_code_for_canonical_type_merging (TREE_CODE (type)); + hstate.add_int (code); hstate.add_int (TYPE_MODE (type)); /* Incorporate common features of numerical types. */ @@ -309,8 +311,9 @@ hash_canonical_type (tree type) || TREE_CODE (type) == OFFSET_TYPE || POINTER_TYPE_P (type)) { - hstate.add_int (TYPE_UNSIGNED (type)); hstate.add_int (TYPE_PRECISION (type)); + if (!type_with_interoperable_signedness (type)) + hstate.add_int (TYPE_UNSIGNED (type)); } if (VECTOR_TYPE_P (type)) |