Skip to content
Snippets Groups Projects
Commit dbb0c80c authored by Eric Botcazou's avatar Eric Botcazou Committed by Pierre-Marie de Rodat
Browse files

[Ada] Get rid of secondary stack for controlled components of limited types

The initial work didn't change anything for limited types because they use
a specific return mechanism for functions called build-in-place where there
is no anonymous return object, so the secondary stack was used only for the
sake of consistency with the nonlimited case.

This change aligns the limited case with the nonlimited case, i.e. either
they both use the primary stack or they both use the secondary stack.

gcc/ada/

	* exp_ch6.adb (Caller_Known_Size): Call Returns_On_Secondary_Stack
	instead of Requires_Transient_Scope and tidy up.
	(Needs_BIP_Alloc_Form): Likewise.
	* exp_util.adb (Initialized_By_Aliased_BIP_Func_Call): Also return
	true if the build-in-place function call has no BIPalloc parameter.
	(Is_Finalizable_Transient): Remove redundant test.
parent 7a9800fa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment