[Ada] Adding assertions on extra formals for BIP function calls
authorJavier Miranda <miranda@adacore.com>
Tue, 17 Sep 2019 07:59:33 +0000 (07:59 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 17 Sep 2019 07:59:33 +0000 (07:59 +0000)
commit1ed19d98def3515e5b2fb9e68be34da4a78a7fdb
treea9c52d5ac642a04f1861425dbd304bc678b0247e
parent2d319f3acef1e80d7bb288a6b5d1ae76f2968b45
[Ada] Adding assertions on extra formals for BIP function calls

This patch adds assertions to ensure that the frontend passes to the
backend the right number of extra parameters required for build in place
function calls. No functional change.

2019-09-17  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
cleanup.
(Check_Number_Of_Actuals): New subprogram.
(Make_Build_In_Place_Call_In_Allocator): Adding assertion.
(Make_Build_In_Place_Call_In_Anonymous_Context): Adding
assertion.
(Make_Build_In_Place_Call_In_Assignment): Adding assertion.
(Make_Build_In_Place_Call_In_Object_Declaration): Code cleanup
plus assertion addition.
(Needs_BIP_Task_Actuals): New subprogram.
* sem_ch6.adb (Create_Extra_Formals): Rely on
Needs_BIP_Task_Actuals() to check if the master of the tasks to
be created, and the caller's activation chain formals are
needed.

From-SVN: r275772
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch6.ads
gcc/ada/sem_ch6.adb