re PR c++/21123 (ICE in cp_expr_size, at cp/cp-objcp-common.c:101)
PR c++/21123 * cp/method.c (use_thunk): Use build_cplus_new instead of force_target_expr. * tree.h (CALL_FROM_THUNK_P): Add CALL_EXPR_CHECK. From-SVN: r106634
This commit is contained in:
parent
dfea1f6121
commit
831d8bd741
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2005-11-08 Uros Bizjak <uros@kss-loka.si>
|
||||||
|
|
||||||
PR target/19340
|
PR target/19340
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2005-11-06 Jason Merrill <jason@redhat.com>
|
||||||
James A. Morrison <phython@gcc.gnu.org>
|
James A. Morrison <phython@gcc.gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -502,7 +502,8 @@ use_thunk (tree thunk_fndecl, bool emit_p)
|
||||||
t = build3 (COND_EXPR, TREE_TYPE (t), cond, t,
|
t = build3 (COND_EXPR, TREE_TYPE (t), cond, t,
|
||||||
cp_convert (TREE_TYPE (t), integer_zero_node));
|
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);
|
finish_return_stmt (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
// 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;
|
||||||
|
}
|
|
@ -1023,7 +1023,7 @@ extern void tree_operand_check_failed (int, enum tree_code,
|
||||||
|
|
||||||
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
|
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
|
||||||
thunked-to function. */
|
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
|
/* 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
|
language or front-end to be properly aligned, so we can indicate that a MEM
|
||||||
|
|
Loading…
Reference in New Issue