This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix intermittent simd-5 failure
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 04:03:03 -0800
- Subject: 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);