]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/45586 (ICE non-trivial conversion at assignment)
authorRichard Biener <rguenther@suse.de>
Thu, 9 Jan 2014 11:52:43 +0000 (11:52 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 9 Jan 2014 11:52:43 +0000 (11:52 +0000)
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

gcc/lto/ChangeLog
gcc/lto/lto.c

index ad51a4746ff9ce3635b829ebf29dd911d36cc953..3830cdbf46c303ed744c34ca809b5755443b2ddb 100644 (file)
@@ -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
index eb56e89a83300f03a4fa286860544e9935698e6e..f78268344b7731b79d0d2e64be784b2821c4c135 100644 (file)
@@ -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;
        }