This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Restore fold checking
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 21 Apr 2012 19:53:08 +0100
- Subject: [committed] Restore fold checking
Noticed after making yes,rtl,df,fold my default --enable-checking option
(the rtl and df bits being long overdue). Bootstrapped & regression-tested
on x86_64-linux-gnu and installed as obvious.
Richard
gcc/
* fold-const.c (fold_checksum_tree): Fix VECTOR_CST case.
Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c 2012-04-21 18:50:37.000000000 +0100
+++ gcc/fold-const.c 2012-04-21 18:50:37.559865589 +0100
@@ -14391,7 +14391,8 @@ fold_checksum_tree (const_tree expr, str
fold_checksum_tree (TREE_IMAGPART (expr), ctx, ht);
break;
case VECTOR_CST:
- fold_checksum_tree (TREE_VECTOR_CST_ELTS (expr), ctx, ht);
+ for (i = 0; i < (int) VECTOR_CST_NELTS (expr); ++i)
+ fold_checksum_tree (VECTOR_CST_ELT (expr, i), ctx, ht);
break;
default:
break;