aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 430b761..c09434d 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -12131,7 +12131,6 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data,
case INTEGER_CST:
case REAL_CST:
case FIXED_CST:
- case VECTOR_CST:
case STRING_CST:
case BLOCK:
case PLACEHOLDER_EXPR:
@@ -12162,6 +12161,18 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data,
WALK_SUBTREE_TAIL (TREE_VEC_ELT (*tp, 0));
}
+ case VECTOR_CST:
+ {
+ unsigned len = vector_cst_encoded_nelts (*tp);
+ if (len == 0)
+ break;
+ /* Walk all elements but the first. */
+ while (--len)
+ WALK_SUBTREE (VECTOR_CST_ENCODED_ELT (*tp, len));
+ /* Now walk the first one as a tail call. */
+ WALK_SUBTREE_TAIL (VECTOR_CST_ENCODED_ELT (*tp, 0));
+ }
+
case COMPLEX_CST:
WALK_SUBTREE (TREE_REALPART (*tp));
WALK_SUBTREE_TAIL (TREE_IMAGPART (*tp));