aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index db31620..a58f9aa 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13138,6 +13138,25 @@ drop_tree_overflow (tree t)
and drop the flag. */
t = copy_node (t);
TREE_OVERFLOW (t) = 0;
+
+ /* For constants that contain nested constants, drop the flag
+ from those as well. */
+ if (TREE_CODE (t) == COMPLEX_CST)
+ {
+ if (TREE_OVERFLOW (TREE_REALPART (t)))
+ TREE_REALPART (t) = drop_tree_overflow (TREE_REALPART (t));
+ if (TREE_OVERFLOW (TREE_IMAGPART (t)))
+ TREE_IMAGPART (t) = drop_tree_overflow (TREE_IMAGPART (t));
+ }
+ if (TREE_CODE (t) == VECTOR_CST)
+ {
+ for (unsigned i = 0; i < VECTOR_CST_NELTS (t); ++i)
+ {
+ tree& elt = VECTOR_CST_ELT (t, i);
+ if (TREE_OVERFLOW (elt))
+ elt = drop_tree_overflow (elt);
+ }
+ }
return t;
}