aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEtienne Servais <servais@adacore.com>2021-09-22 17:20:27 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-11-09 09:44:46 +0000
commit74e514af79c4e01a6ff7fab4b7c7a79cad058c3c (patch)
tree2e86441392af8bf211307c6ab6f656a6fd7672a0 /gcc
parent6b8b959675a3e14cfdd2145bd62e4260eb193765 (diff)
downloadgcc-74e514af79c4e01a6ff7fab4b7c7a79cad058c3c.zip
gcc-74e514af79c4e01a6ff7fab4b7c7a79cad058c3c.tar.gz
gcc-74e514af79c4e01a6ff7fab4b7c7a79cad058c3c.tar.bz2
[Ada] Build activation chain for BIP only when needed
gcc/ada/ * exp_ch6.adb (Expand_Actuals): Add a condition to check for the possibility of task.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch6.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 6015993..fa1a89a 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -2292,8 +2292,11 @@ package body Exp_Ch6 is
null;
elsif Is_Build_In_Place_Function_Call (Actual) then
- Build_Activation_Chain_Entity (N);
- Build_Master_Entity (Etype (Actual));
+ if Might_Have_Tasks (Etype (Actual)) then
+ Build_Activation_Chain_Entity (N);
+ Build_Master_Entity (Etype (Actual));
+ end if;
+
Make_Build_In_Place_Call_In_Anonymous_Context (Actual);
-- Ada 2005 (AI-318-02): Specialization of the previous case for