The Returns_On_Secondary_Stack predicate is a misnomer because it must be invoked on a type and types do not return; as a matter of fact, the other Returns_XXX predicates apply to functions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Caller_Known_Size): Invoke Needs_Secondary_Stack in lieu of Returns_On_Secondary_Stack. (Expand_Call_Helper): Likewise. (Expand_Simple_Function_Return): Likewise. (Needs_BIP_Alloc_Form): Likewise. * exp_ch7.adb (Wrap_Transient_Declaration): Likewise. * sem_res.adb (Resolve_Call): Likewise. (Resolve_Entry_Call): Likewise. * sem_util.ads (Returns_On_Secondary_Stack): Rename into... (Needs_Secondary_Stack): ...this. * sem_util.adb (Returns_On_Secondary_Stack): Rename into... (Needs_Secondary_Stack): ...this. * fe.h (Returns_On_Secondary_Stack): Delete. (Needs_Secondary_Stack): New function. * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Replace call to Returns_On_Secondary_Stack with Needs_Secondary_Stack.