+2018-01-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/83556
+ * tree.c (replace_placeholders_r): Pass NULL as last argument to
+ cp_walk_tree instead of d->pset. If non-TREE_CONSTANT and
+ non-PLACEHOLDER_EXPR tree has been seen already, set *walk_subtrees
+ to false and return.
+ (replace_placeholders): Pass NULL instead of &pset as last argument
+ to cp_walk_tree.
+
2018-01-02 Nathan Sidwell <nathan@acm.org>
* constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local
{
constructor_elt *ce;
vec<constructor_elt,va_gc> *v = CONSTRUCTOR_ELTS (*t);
+ if (d->pset->add (*t))
+ {
+ *walk_subtrees = false;
+ return NULL_TREE;
+ }
for (unsigned i = 0; vec_safe_iterate (v, i, &ce); ++i)
{
tree *valp = &ce->value;
valp = &TARGET_EXPR_INITIAL (*valp);
}
d->obj = subob;
- cp_walk_tree (valp, replace_placeholders_r, data_, d->pset);
+ cp_walk_tree (valp, replace_placeholders_r, data_, NULL);
d->obj = obj;
}
*walk_subtrees = false;
}
default:
+ if (d->pset->add (*t))
+ *walk_subtrees = false;
break;
}
replace_placeholders_t data = { obj, false, &pset };
if (TREE_CODE (exp) == TARGET_EXPR)
tp = &TARGET_EXPR_INITIAL (exp);
- cp_walk_tree (tp, replace_placeholders_r, &data, &pset);
+ cp_walk_tree (tp, replace_placeholders_r, &data, NULL);
if (seen_p)
*seen_p = data.seen;
return exp;