This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix intermittent simd-5 failure


Comparison of VECTOR_CSTs never could work, since passing the
TREE_LIST back to operand_equal_p would result in trying to 
take TYPE_UNSIGNED (TREE_TYPE (X)) of the TREE_LIST.

The test passes quite often by accident because the two vectors
that are being compared turn out to be the same vector, so the
earlier pointer comparison succeeds.

Applied mainline and tree-ssa.


r~



        * fold-const.c (operand_equal_p): Fix VECTOR_CST comparison.

Index: gcc/fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.213.2.70
diff -c -p -d -u -r1.213.2.70 fold-const.c
--- gcc/fold-const.c	13 Feb 2004 13:11:26 -0000	1.213.2.70
+++ gcc/fold-const.c	16 Feb 2004 11:45:43 -0000
@@ -2185,7 +2185,8 @@ operand_equal_p (tree arg0, tree arg1, i
 	  v2 = TREE_VECTOR_CST_ELTS (arg1);
 	  while (v1 && v2)
 	    {
-	      if (!operand_equal_p (v1, v2, only_const))
+	      if (!operand_equal_p (TREE_VALUE (v1), TREE_VALUE (v2),
+				    only_const))
 		return 0;
 	      v1 = TREE_CHAIN (v1);
 	      v2 = TREE_CHAIN (v2);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]