* fold-const.c (operand_equal_p): Fix VECTOR_CST comparison.
authorRichard Henderson <rth@redhat.com>
Mon, 16 Feb 2004 11:59:49 +0000 (03:59 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 16 Feb 2004 11:59:49 +0000 (03:59 -0800)
From-SVN: r77883

gcc/ChangeLog
gcc/fold-const.c

index 49ae020a1333af9c6851aff989104c30fa0ca4c3..094fee8f625fdad75fe3bcb2ce8918922eabff53 100644 (file)
@@ -2,6 +2,8 @@
 
        * cse.c (cse_insn): Don't lose REG_NON_LOCAL_GOTO note.
 
+        * fold-const.c (operand_equal_p): Fix VECTOR_CST comparison.
+
 2004-02-15  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.md: Remove unnecessary parallels from
index 71f1e9bce0957973f31b1ea524a0ab390628898e..f9b7808cbe60ff91f0e82bf6c142fb3949a54530 100644 (file)
@@ -2198,7 +2198,8 @@ operand_equal_p (tree arg0, tree arg1, int only_const)
          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);