STATEMENT_LIST wouldn't be present at all the resulting
expression wouldn't have TREE_SIDE_EFFECTS set, so make sure
to clear it even on the STATEMENT_LIST in such cases. */
+ hash_set<tree> *pset = (c_dialect_cxx ()
+ ? nullptr
+ : static_cast<hash_set<tree> *>(data));
for (i = tsi_start (stmt); !tsi_end_p (i); tsi_next (&i))
{
tree t = tsi_stmt (i);
if (TREE_CODE (t) != DEBUG_BEGIN_STMT && nondebug_stmts < 2)
nondebug_stmts++;
- walk_tree_1 (tsi_stmt_ptr (i), func, data, NULL, lh);
+ walk_tree_1 (tsi_stmt_ptr (i), func, data, pset, lh);
if (TREE_CODE (t) != DEBUG_BEGIN_STMT
&& (nondebug_stmts > 1 || TREE_SIDE_EFFECTS (tsi_stmt (i))))
clear_side_effects = false;
bc_state_t save_state;
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
save_bc_state (&save_state);
- walk_tree_without_duplicates (&DECL_SAVED_TREE (fndecl),
- c_genericize_control_r, NULL);
+ hash_set<tree> pset;
+ walk_tree (&DECL_SAVED_TREE (fndecl), c_genericize_control_r, &pset,
+ &pset);
restore_bc_state (&save_state);
pop_cfun ();
}