[RFH] [tree-ssa] disabling lowering for &a->b causes ICE
Richard Henderson
rth@redhat.com
Sun Feb 15 17:42:00 GMT 2004
On Sun, Feb 15, 2004 at 12:03:54AM -0800, Andrew Pinski wrote:
> @@ -4048,6 +4115,8 @@ build_unary_op (enum tree_code code, tre
> }
> else
> {
> + return build1 (ADDR_EXPR, argtype, arg);
> +#if 0
> /* Unfortunately we cannot just build an address
> expression here, because we would not handle
> address-constant-expressions or offsetof correctly. */
> @@ -4061,6 +4130,7 @@ build_unary_op (enum tree_code code, tre
> rval = build_nop (argtype, rval);
> addr = fold (build (PLUS_EXPR, argtype, rval,
> cp_convert (argtype, byte_position (field))));
> +#endif
This is gonna be your problem. With the way the C++ front end
currently structures inheritence, you can't get a direct field
reference to anything except the current class.
It will always be true that you can't get a direct field reference
to a field of a virtual base, but I believe we can rearrange things
to structure regular inheritence more like nested structures.
That said, let's get the offsetof parts of this patch tested and
in (to mainline, I guess) without muddying the waters with unary_op
changes.
r~
More information about the Gcc
mailing list