http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
This is my bad. I forget to check the test result for gfortran. With this patch the bug should be fixed (tested on x86-64). thanks, Cong diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90b01f2..e62c672 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-11-08 Cong Hou <co...@google.com> + + PR tree-optimization/59050 + * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix. + 2013-11-07 Cong Hou <co...@google.com> * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index b2a31b1..b7eb926 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2669,9 +2669,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_, const void *p2_) if (comp_res != 0) return comp_res; } - if (tree_int_cst_compare (p11.offset, p21.offset) < 0) + else if (tree_int_cst_compare (p11.offset, p21.offset) < 0) return -1; - if (tree_int_cst_compare (p11.offset, p21.offset) > 0) + else if (tree_int_cst_compare (p11.offset, p21.offset) > 0) return 1; if (TREE_CODE (p12.offset) != INTEGER_CST || TREE_CODE (p22.offset) != INTEGER_CST) @@ -2680,9 +2680,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_, const void *p2_) if (comp_res != 0) return comp_res; } - if (tree_int_cst_compare (p12.offset, p22.offset) < 0) + else if (tree_int_cst_compare (p12.offset, p22.offset) < 0) return -1; - if (tree_int_cst_compare (p12.offset, p22.offset) > 0) + else if (tree_int_cst_compare (p12.offset, p22.offset) > 0) return 1; return 0;