aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-06-04 18:38:50 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2015-06-04 16:38:50 +0000
commit9cb9b9379e8683825f064c91cd283fd0fb97a738 (patch)
treec8294be6e931cc9efefd835049d806e5c39a7f5a /gcc/tree.c
parent19cd26a6b937349161ef2f7ae6bf41cee61bc81b (diff)
downloadgcc-9cb9b9379e8683825f064c91cd283fd0fb97a738.zip
gcc-9cb9b9379e8683825f064c91cd283fd0fb97a738.tar.gz
gcc-9cb9b9379e8683825f064c91cd283fd0fb97a738.tar.bz2
lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
* lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging. * tree.h (tree_code_for_canonical_type_merging): New function. * tree.c (gimple_canonical_types_compatible_p): Use tree_code_for_canonical_type_merging.. * gcc.dg/lto/c-compatible-types_0.c: New testcase. * gcc.dg/lto/c-compatible-types_1.c: New testcase. From-SVN: r224135
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index b0aeb74..b324405 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -12930,7 +12930,8 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2,
return TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2);
/* Can't be the same type if the types don't have the same code. */
- if (TREE_CODE (t1) != TREE_CODE (t2))
+ if (tree_code_for_canonical_type_merging (TREE_CODE (t1))
+ != tree_code_for_canonical_type_merging (TREE_CODE (t2)))
return false;
/* Qualifiers do not matter for canonical type comparison purposes. */