This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: store_expr, expr_size, and C++
- From: Richard Henderson <rth at redhat dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 26 Feb 2007 17:00:41 -0800
- Subject: Re: store_expr, expr_size, and C++
- References: <200702262204.OAA27239@hpsje.cup.hp.com>
On Mon, Feb 26, 2007 at 02:04:36PM -0800, Steve Ellcey wrote:
> I am looking at PR target/30826 (an IA64 ABI bug) and have come up with
> a patch that basically involves turning off the
> CALL_EXPR_RETURN_SLOT_OPT optimization in some instances and forcing GCC
> to create a temporary for the (large aggragete) return value of a
> function and then copying that temporary value to the desired target.
Which is simply not possible in general for C++. You can't
solve the problem this way.
I think the ABI requirement for 16-byte alignment for structs
that don't ordinarily require them is a bit odd. You'll have
to relax this for C++ non-POD data, as it simply cannot be
provided in some cases. You can tell this with TREE_ADDRESSABLE
set on the type node.
For other cases, you may be able to promote a local temporary
to 16 byte alignment rather than disable the return slot opt.
r~