This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFH] [tree-ssa] disabling lowering for &a->b causes ICE
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc at gcc dot gnu dot org List" <gcc at gcc dot gnu dot org>
- Date: Sun, 15 Feb 2004 09:42:52 -0800
- Subject: Re: [RFH] [tree-ssa] disabling lowering for &a->b causes ICE
- References: <7FF37753-5F8D-11D8-AC2C-000393A6D2F2@physics.uc.edu>
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~