* optimize.c (copy_body_r): Pass it.
* tree.c (remap_save_expr): Clear walk_subtrees for an
already-handled SAVE_EXPR.
(cp_unsave_r): Pass walk_subtrees to remap_save_expr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30926
138bc75d-0d04-0410-961f-
82ee72b054a4
1999-12-14 Mark Mitchell <mark@codesourcery.com>
+ * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
+ * optimize.c (copy_body_r): Pass it.
+ * tree.c (remap_save_expr): Clear walk_subtrees for an
+ already-handled SAVE_EXPR.
+ (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
+
* dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
* ir.texi (DECL_NAMESPACE_ALIAS): Document it.
extern int cp_valid_lang_attribute PROTO((tree, tree, tree, tree));
extern tree make_ptrmem_cst PROTO((tree, tree));
extern tree cp_build_qualified_type_real PROTO((tree, int, int));
-extern void remap_save_expr PROTO((tree *, splay_tree, tree));
+extern void remap_save_expr PROTO((tree *, splay_tree, tree, int *));
#define cp_build_qualified_type(TYPE, QUALS) \
cp_build_qualified_type_real ((TYPE), (QUALS), /*complain=*/1)
*tp = new_decl;
}
else if (TREE_CODE (*tp) == SAVE_EXPR)
- remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0));
+ remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0),
+ walk_subtrees);
else if (TREE_CODE (*tp) == UNSAVE_EXPR)
my_friendly_abort (19991113);
/* For a SCOPE_STMT, we must copy the associated block so that we
ST. FN is the function into which the copy will be placed. */
void
-remap_save_expr (tp, st, fn)
+remap_save_expr (tp, st, fn, walk_subtrees)
tree *tp;
splay_tree st;
tree fn;
+ int *walk_subtrees;
{
splay_tree_node n;
(splay_tree_key) *tp,
(splay_tree_value) t);
}
+ else
+ /* We've already walked into this SAVE_EXPR, so we needn't do it
+ again. */
+ *walk_subtrees = 0;
/* Replace this SAVE_EXPR with the copy. */
*tp = (tree) n->value;
*tp = (tree) n->value;
}
else if (TREE_CODE (*tp) == SAVE_EXPR)
- remap_save_expr (tp, st, current_function_decl);
+ remap_save_expr (tp, st, current_function_decl, walk_subtrees);
else
{
copy_tree_r (tp, walk_subtrees, NULL);
--- /dev/null
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+// Special g++ Options: -O3
+
+class ostream;
+
+struct S
+{
+ virtual void print(ostream&) const = 0;
+};
+
+template <class _Tp>
+class vector
+{
+public:
+ _Tp& operator[](unsigned __n) const { return *(_M_start + __n); }
+ _Tp* _M_start;
+};
+
+class T
+{
+public:
+
+ void print(ostream&) const;
+
+ vector<S*> bcList_m;
+};
+
+void T::print(ostream& o) const
+{
+ int n = 3;
+
+ for (int i = 0; i < n; ++i)
+ bcList_m[i]->print(o);
+ return;
+}
+
+ostream&
+operator<<(ostream& o, const T& bcList)
+{
+ bcList.print(o);
+ return o;
+}
+
+
+
+
+
+
+
+