From d05b99205d244d9efd2758f80554b926d47972e6 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 9 Jan 2014 11:52:43 +0000 Subject: [PATCH] re PR fortran/45586 (ICE non-trivial conversion at assignment) 2014-01-09 Richard Biener PR lto/45586 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE, TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL. (gimple_canonical_types_compatible_p): Do not compare them either. From-SVN: r206461 --- gcc/lto/ChangeLog | 7 +++++++ gcc/lto/lto.c | 18 +----------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index ad51a4746ff..3830cdbf46c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2014-01-09 Richard Biener + + PR lto/45586 + * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE, + TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL. + (gimple_canonical_types_compatible_p): Do not compare them either. + 2014-01-02 Richard Sandiford Update copyright years diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index eb56e89a833..f78268344b7 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -280,8 +280,6 @@ hash_canonical_type (tree type) only existing types having the same features as the new type will be checked. */ v = iterative_hash_hashval_t (TREE_CODE (type), 0); - v = iterative_hash_hashval_t (TREE_ADDRESSABLE (type), v); - v = iterative_hash_hashval_t (TYPE_ALIGN (type), v); v = iterative_hash_hashval_t (TYPE_MODE (type), v); /* Incorporate common features of numerical types. */ @@ -308,9 +306,7 @@ hash_canonical_type (tree type) pointed to but do not recurse to the pointed-to type. */ if (POINTER_TYPE_P (type)) { - v = iterative_hash_hashval_t (TYPE_REF_CAN_ALIAS_ALL (type), v); v = iterative_hash_hashval_t (TYPE_ADDR_SPACE (TREE_TYPE (type)), v); - v = iterative_hash_hashval_t (TYPE_RESTRICT (type), v); v = iterative_hash_hashval_t (TREE_CODE (TREE_TYPE (type)), v); } @@ -447,9 +443,6 @@ gimple_canonical_types_compatible_p (tree t1, tree t2) if (TREE_CODE (t1) != TREE_CODE (t2)) return false; - if (TREE_ADDRESSABLE (t1) != TREE_ADDRESSABLE (t2)) - return false; - /* Qualifiers do not matter for canonical type comparison purposes. */ /* Void types and nullptr types are always the same. */ @@ -458,8 +451,7 @@ gimple_canonical_types_compatible_p (tree t1, tree t2) return true; /* Can't be the same type if they have different alignment, or mode. */ - if (TYPE_ALIGN (t1) != TYPE_ALIGN (t2) - || TYPE_MODE (t1) != TYPE_MODE (t2)) + if (TYPE_MODE (t1) != TYPE_MODE (t2)) return false; /* Non-aggregate types can be handled cheaply. */ @@ -486,18 +478,10 @@ gimple_canonical_types_compatible_p (tree t1, tree t2) useless_type_conversion_p would do. */ if (POINTER_TYPE_P (t1)) { - /* If the two pointers have different ref-all attributes, - they can't be the same type. */ - if (TYPE_REF_CAN_ALIAS_ALL (t1) != TYPE_REF_CAN_ALIAS_ALL (t2)) - return false; - if (TYPE_ADDR_SPACE (TREE_TYPE (t1)) != TYPE_ADDR_SPACE (TREE_TYPE (t2))) return false; - if (TYPE_RESTRICT (t1) != TYPE_RESTRICT (t2)) - return false; - if (TREE_CODE (TREE_TYPE (t1)) != TREE_CODE (TREE_TYPE (t2))) return false; } -- 2.11.4.GIT