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~