[Ada] Fix formal parameters list for secondary stack allocation procedure

Message ID 20220906071559.GA1280483@poulhies-Precision-5550
State New, archived
Headers
Series [Ada] Fix formal parameters list for secondary stack allocation procedure |

Commit Message

Marc Poulhiès Sept. 6, 2022, 7:15 a.m. UTC
  The introduction of the Alignment parameter for the secondary stack
allocator in previous change was missing the corresponding change in the
Build_Allocate_Deallocate_Proc when creating the formal parameters list.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* exp_util.adb (Build_Allocate_Deallocate_Proc): Add
	Alignment_Param in the formal list for calls to SS_Allocate.
  

Patch

diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -1293,7 +1293,8 @@  package body Exp_Util is
                --  Gigi expects a different profile in the Secondary_Stack_Pool
                --  case. There must be no uses of the two missing formals
                --  (i.e., Pool_Param and Alignment_Param) in this case.
-               Formal_Params := New_List (Address_Param, Size_Param);
+               Formal_Params := New_List
+                 (Address_Param, Size_Param, Alignment_Param);
             else
                Formal_Params := New_List (
                  Pool_Param, Address_Param, Size_Param, Alignment_Param);