mirror of git://gcc.gnu.org/git/gcc.git
typeck.c (build_unary_op): Do not resort to address arithmetic when taking the address of a COMPONENT_REF.
* typeck.c (build_unary_op): Do not resort to address arithmetic when taking the address of a COMPONENT_REF. From-SVN: r99503
This commit is contained in:
parent
6323b34eeb
commit
9d9165ef48
|
@ -1,3 +1,8 @@
|
||||||
|
2005-05-09 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* typeck.c (build_unary_op): Do not resort to address arithmetic
|
||||||
|
when taking the address of a COMPONENT_REF.
|
||||||
|
|
||||||
2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
|
2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
* class.c (vtbl_init_data_s): Change the type of fns to
|
* class.c (vtbl_init_data_s): Change the type of fns to
|
||||||
|
|
|
@ -4107,15 +4107,10 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
tree object = TREE_OPERAND (arg, 0);
|
||||||
tree field = TREE_OPERAND (arg, 1);
|
tree field = TREE_OPERAND (arg, 1);
|
||||||
tree rval = build_unary_op (ADDR_EXPR, TREE_OPERAND (arg, 0), 0);
|
gcc_assert (same_type_ignoring_top_level_qualifiers_p
|
||||||
tree binfo = lookup_base (TREE_TYPE (TREE_TYPE (rval)),
|
(TREE_TYPE (object), decl_type_context (field)));
|
||||||
decl_type_context (field),
|
|
||||||
ba_check, NULL);
|
|
||||||
|
|
||||||
rval = build_base_path (PLUS_EXPR, rval, binfo, 1);
|
|
||||||
|
|
||||||
TREE_OPERAND (arg, 0) = build_indirect_ref (rval, NULL);
|
|
||||||
addr = build_address (arg);
|
addr = build_address (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue