+2010-01-07 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/42157
+ * tree-sra.c (compare_access_positions): Stabilize sort if both
+ accesses have integer types, return zero immediately if they are the
+ same.
+
2010-01-06 Richard Henderson <rth@redhat.com>
PR middle-end/41883
if (f1->size == f2->size)
{
+ if (f1->type == f2->type)
+ return 0;
/* Put any non-aggregate type before any aggregate type. */
- if (!is_gimple_reg_type (f1->type)
+ else if (!is_gimple_reg_type (f1->type)
&& is_gimple_reg_type (f2->type))
return 1;
else if (is_gimple_reg_type (f1->type)
/* Put the integral type with the bigger precision first. */
else if (INTEGRAL_TYPE_P (f1->type)
&& INTEGRAL_TYPE_P (f2->type))
- return TYPE_PRECISION (f1->type) > TYPE_PRECISION (f2->type) ? -1 : 1;
+ return TYPE_PRECISION (f2->type) - TYPE_PRECISION (f1->type);
/* Put any integral type with non-full precision last. */
else if (INTEGRAL_TYPE_P (f1->type)
&& (TREE_INT_CST_LOW (TYPE_SIZE (f1->type))