This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TREE_ADDRESSABLE types cause ICE in declare_return_variable
> I don't know exactly what is going wrong. But I can tell you that if
> a function returns a TREE_ADDRESSABLE type, that should be handled by
> passing in an invisible first parameter that is a pointer to the area
> on the stack where the function should write the return value.
Yes, TREE_ADDRESSABLE types cannot be returned by value. Either you return
them via the invisible parameter manually or you set DECL_BY_REFERENCE on the
RESULT_DECL and the middle-end should do it for you. The C++ and Ada FEs use
the latter mechanism.
--
Eric Botcazou