Restore type attribute comparison
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 16 Jul 2012 12:35:10 +0000 (12:35 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 16 Jul 2012 12:35:10 +0000 (05:35 -0700)
PR middle-end/53959
PR bootstrap/53963
* gimple.c (gimple_types_compatible_p_1): Restore type attribute
comparison.

From-SVN: r189528

gcc/ChangeLog
gcc/gimple.c

index a7bf2ff5f13360ce3bdbfc3f31f13906b8ce32e6..bffd7bce32de981efa754fd8ebd2fa7e1d8bbc62 100644 (file)
@@ -1,3 +1,10 @@
+2012-07-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR middle-end/53959
+       PR bootstrap/53963
+       * gimple.c (gimple_types_compatible_p_1): Restore type attribute
+       comparison.
+
 2012-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
 
        * opts.c (default_option): Add -fvect-cost-model to default options
index b419591d3ec3dea7b0695ff9ebf8438d238c4823..4d2a0f5ffdee7a156c08a30ff3f7800521b6e18f 100644 (file)
@@ -3422,6 +3422,10 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p,
        goto different_types;
     }
 
+  /* If their attributes are not the same they can't be the same type.  */
+  if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2)))
+    goto different_types;
+
   /* Do type-specific comparisons.  */
   switch (TREE_CODE (t1))
     {