Get rid of useless temporary for call to pure function
This avoids creating a useless temporary for a call to a pure function with
good properties by using the RSO.
gcc/ada/
* gcc-interface/trans.c (is_array_of_scalar_type): New predicate.
(find_decls_r): New function.
(return_slot_opt_for_pure_call_p): New predicate.
(Call_to_gnu): Do not create a temporary for the return value if the
parent node is an aggregate. If there is a target, try to apply the
return slot optimization to regular calls to pure functions returning
an array of scalar type.