diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 862e2bf72744..2f7034c9f004 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-05-17 Bernd Schmidt + + PR middle-end/27620 + * expr.c (safe_from_p): Handle CONSTRUCTOR again. + 2006-05-17 Jakub Jelinek PR middle-end/27415 diff --git a/gcc/expr.c b/gcc/expr.c index f59cc426a175..f0a05e907c45 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6075,6 +6075,19 @@ safe_from_p (rtx x, tree exp, int top_p) return safe_from_p (x, exp, 0); } } + else if (TREE_CODE (exp) == CONSTRUCTOR) + { + constructor_elt *ce; + unsigned HOST_WIDE_INT idx; + + for (idx = 0; + VEC_iterate (constructor_elt, CONSTRUCTOR_ELTS (exp), idx, ce); + idx++) + if ((ce->index != NULL_TREE && !safe_from_p (x, ce->index, 0)) + || !safe_from_p (x, ce->value, 0)) + return 0; + return 1; + } else if (TREE_CODE (exp) == ERROR_MARK) return 1; /* An already-visited SAVE_EXPR? */ else