TREE_ADDRESSABLE types cause ICE in declare_return_variable

Eric Botcazou ebotcazou@adacore.com
Thu Feb 21 17:08:00 GMT 2013


> 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



More information about the Gcc mailing list