Skip to content
Snippets Groups Projects
  • Javier Miranda's avatar
    358e289d
    ada: Fix unsupported dispatching constructor call · 358e289d
    Javier Miranda authored
    Add dummy build-in-place parameters when a BIP function does not
    require the BIP parameters but it is a dispatching operation that
    inherited them.
    
    gcc/ada/
    
    	* einfo-utils.adb (Underlying_Type): Protect recursion call
    	against non-available attribute Etype.
    	* einfo.ads (Protected_Subprogram): Fix typo in documentation.
    	* exp_ch3.adb (BIP_Function_Call_Id): New subprogram.
    	(Expand_N_Object_Declaration): Improve code that evaluates if the
    	object is initialized with a BIP function call.
    	* exp_ch6.adb (Is_True_Build_In_Place_Function_Call): New
    	subprogram.
    	(Add_Task_Actuals_To_Build_In_Place_Call): Add dummy actuals if
    	the function does not require the BIP task actuals but it is a
    	dispatching operation that inherited them.
    	(Build_In_Place_Formal): Improve code to avoid never-ending loop
    	if the BIP formal is not found.
    	(Add_Dummy_Build_In_Place_Actuals): New subprogram.
    	(Expand_Call_Helper): Add calls to
    	Add_Dummy_Build_In_Place_Actuals.
    	(Expand_N_Extended_Return_Statement): Adjust assertion.
    	(Expand_Simple_Function_Return): Adjust assertion.
    	(Make_Build_In_Place_Call_In_Allocator): No action needed if the
    	called function inherited the BIP extra formals but it is not a
    	true BIP function.
    	(Make_Build_In_Place_Call_In_Assignment): Ditto.
    	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove code
    	reporting unsupported case (since this patch adds support for it).
    	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Adding assertion
    	to ensure matching of BIP formals when setting the
    	Protected_Formal field of a protected subprogram to reference the
    	corresponding extra formal of the subprogram that implements it.
    	(Might_Need_BIP_Task_Actuals): New subprogram.
    	(Create_Extra_Formals): Improve code adding inherited extra
    	formals.
    358e289d
    History
    ada: Fix unsupported dispatching constructor call
    Javier Miranda authored
    Add dummy build-in-place parameters when a BIP function does not
    require the BIP parameters but it is a dispatching operation that
    inherited them.
    
    gcc/ada/
    
    	* einfo-utils.adb (Underlying_Type): Protect recursion call
    	against non-available attribute Etype.
    	* einfo.ads (Protected_Subprogram): Fix typo in documentation.
    	* exp_ch3.adb (BIP_Function_Call_Id): New subprogram.
    	(Expand_N_Object_Declaration): Improve code that evaluates if the
    	object is initialized with a BIP function call.
    	* exp_ch6.adb (Is_True_Build_In_Place_Function_Call): New
    	subprogram.
    	(Add_Task_Actuals_To_Build_In_Place_Call): Add dummy actuals if
    	the function does not require the BIP task actuals but it is a
    	dispatching operation that inherited them.
    	(Build_In_Place_Formal): Improve code to avoid never-ending loop
    	if the BIP formal is not found.
    	(Add_Dummy_Build_In_Place_Actuals): New subprogram.
    	(Expand_Call_Helper): Add calls to
    	Add_Dummy_Build_In_Place_Actuals.
    	(Expand_N_Extended_Return_Statement): Adjust assertion.
    	(Expand_Simple_Function_Return): Adjust assertion.
    	(Make_Build_In_Place_Call_In_Allocator): No action needed if the
    	called function inherited the BIP extra formals but it is not a
    	true BIP function.
    	(Make_Build_In_Place_Call_In_Assignment): Ditto.
    	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove code
    	reporting unsupported case (since this patch adds support for it).
    	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Adding assertion
    	to ensure matching of BIP formals when setting the
    	Protected_Formal field of a protected subprogram to reference the
    	corresponding extra formal of the subprogram that implements it.
    	(Might_Need_BIP_Task_Actuals): New subprogram.
    	(Create_Extra_Formals): Improve code adding inherited extra
    	formals.