Commit 5b009a96 by Jason Merrill Committed by Jason Merrill

re PR c++/21123 (ICE in cp_expr_size, at cp/cp-objcp-common.c:101)

        PR c++/21123
        * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
        parms in a thunk.

From-SVN: r107738
parent d090221b
2005-11-30 Jason Merrill <jason@redhat.com>
PR c++/21123
* cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
parms in a thunk.
2005-11-30 Ben Elliston <bje@au.ibm.com>
* typeck.c (build_x_unary_op): Correct spelling in error message.
......
......@@ -596,7 +596,10 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
tree stmt = *stmt_p;
struct pointer_set_t *p_set = (struct pointer_set_t*) data;
if (is_invisiref_parm (stmt))
if (is_invisiref_parm (stmt)
/* Don't dereference parms in a thunk, pass the references through. */
&& !(DECL_THUNK_P (current_function_decl)
&& TREE_CODE (stmt) == PARM_DECL))
{
*stmt_p = convert_from_reference (stmt);
*walk_subtrees = 0;
......
// PR c++/21123
struct A
{
A(const A &a);
const A& operator=(const A& a);
};
struct B
{
virtual A f(A);
};
struct C : virtual B
{
virtual A f(A);
};
A C::f(A a)
{
return a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment