+2005-11-08 Jason Merrill <jason@redhat.com>
+
+ * tree.h (CALL_FROM_THUNK_P): Add CALL_EXPR_CHECK.
+
2005-11-08 Uros Bizjak <uros@kss-loka.si>
PR target/19340
+2005-11-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/21123
+ * method.c (use_thunk): Use build_cplus_new instead of
+ force_target_expr.
+
2005-11-06 Jason Merrill <jason@redhat.com>
James A. Morrison <phython@gcc.gnu.org>
t = build3 (COND_EXPR, TREE_TYPE (t), cond, t,
cp_convert (TREE_TYPE (t), integer_zero_node));
}
- t = force_target_expr (TREE_TYPE (t), t);
+ if (IS_AGGR_TYPE (TREE_TYPE (t)))
+ t = build_cplus_new (TREE_TYPE (t), t);
finish_return_stmt (t);
}
--- /dev/null
+// PR c++/21123
+
+struct A
+{
+ A( const A &a);
+ const A& operator=( const A& a);
+};
+
+struct B
+{
+ virtual A f();
+};
+
+struct C : virtual B
+{
+ virtual A f();
+ A a;
+};
+
+A C::f()
+{
+ return a;
+}
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
thunked-to function. */
-#define CALL_FROM_THUNK_P(NODE) ((NODE)->common.protected_flag)
+#define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->common.protected_flag)
/* In a type, nonzero means that all objects of the type are guaranteed by the
language or front-end to be properly aligned, so we can indicate that a MEM