aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-10-10 21:43:49 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2015-10-10 19:43:49 +0000
commit9c4eeafc11dbd996949b3a0c3f5196e7c45ef92f (patch)
treea70d4b968b6a34668f485e3a39033f4dc68cf53c /gcc/lto
parent05486daafd85d56f457ab6808a02de02d53d60b3 (diff)
downloadgcc-9c4eeafc11dbd996949b3a0c3f5196e7c45ef92f.zip
gcc-9c4eeafc11dbd996949b3a0c3f5196e7c45ef92f.tar.gz
gcc-9c4eeafc11dbd996949b3a0c3f5196e7c45ef92f.tar.bz2
tree.c (type_with_interoperable_signedness): New.
* 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. From-SVN: r228680
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 265f5f8..e75b4ea 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-10 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto.c (hash_canonical_type): Honor
+ type_with_interoperable_signedness.
+
2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
* lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 4bb0aaf..76f8e07 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))