aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-01-09 11:52:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-01-09 11:52:43 +0000
commitd05b99205d244d9efd2758f80554b926d47972e6 (patch)
treef5e9972462f41a60dcb3df08c1ad9eed213401b9 /gcc/lto
parent2aaed0f3046ddb9c1e09d52db174718528245fa4 (diff)
downloadgcc-d05b99205d244d9efd2758f80554b926d47972e6.zip
gcc-d05b99205d244d9efd2758f80554b926d47972e6.tar.gz
gcc-d05b99205d244d9efd2758f80554b926d47972e6.tar.bz2
re PR fortran/45586 (ICE non-trivial conversion at assignment)
2014-01-09 Richard Biener <rguenther@suse.de> 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
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog7
-rw-r--r--gcc/lto/lto.c18
2 files changed, 8 insertions, 17 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index ad51a47..3830cdb 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-09 Richard Biener <rguenther@suse.de>
+
+ 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 <rdsandiford@googlemail.com>
Update copyright years
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index eb56e89..f782683 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;
}