aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.ads
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2019-09-17 07:59:33 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-09-17 07:59:33 +0000
commit1ed19d98def3515e5b2fb9e68be34da4a78a7fdb (patch)
treea9c52d5ac642a04f1861425dbd304bc678b0247e /gcc/ada/exp_ch6.ads
parent2d319f3acef1e80d7bb288a6b5d1ae76f2968b45 (diff)
downloadgcc-1ed19d98def3515e5b2fb9e68be34da4a78a7fdb.zip
gcc-1ed19d98def3515e5b2fb9e68be34da4a78a7fdb.tar.gz
gcc-1ed19d98def3515e5b2fb9e68be34da4a78a7fdb.tar.bz2
[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
Diffstat (limited to 'gcc/ada/exp_ch6.ads')
-rw-r--r--gcc/ada/exp_ch6.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads
index bf453d9..13ccb2a 100644
--- a/gcc/ada/exp_ch6.ads
+++ b/gcc/ada/exp_ch6.ads
@@ -244,6 +244,9 @@ package Exp_Ch6 is
-- functions with tagged result types, since they can be invoked via
-- dispatching calls, and descendant types may require finalization.
+ function Needs_BIP_Task_Actuals (Func_Id : Entity_Id) return Boolean;
+ -- Return True if the function returns an object of a type that has tasks.
+
function Needs_Result_Accessibility_Level
(Func_Id : Entity_Id) return Boolean;
-- Ada 2012 (AI05-0234): Return True if the function needs an implicit