aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_aggr.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2008-05-27 14:36:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-05-27 14:36:32 +0200
commit0e08f7ab155784c357e1df6af5c9b57deaa0cd8f (patch)
tree3841ebe985a0cbad8d5c6befceb58d8773774363 /gcc/ada/exp_aggr.adb
parentd33fb1e6debbc2ae26e323685fd9ce321ba65418 (diff)
downloadgcc-0e08f7ab155784c357e1df6af5c9b57deaa0cd8f.zip
gcc-0e08f7ab155784c357e1df6af5c9b57deaa0cd8f.tar.gz
gcc-0e08f7ab155784c357e1df6af5c9b57deaa0cd8f.tar.bz2
exp_aggr.adb (Build_Array_Aggr_Code): If component type includes tasks and context is an object declaration.
2008-05-27 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Build_Array_Aggr_Code): If component type includes tasks and context is an object declaration. create master entity before expansion. From-SVN: r136026
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r--gcc/ada/exp_aggr.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 08e23ab..40ff379 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -1521,6 +1521,16 @@ package body Exp_Aggr is
Make_Integer_Literal (Loc, Uint_0))));
end if;
+ -- If the component type contains tasks, we need to build a Master
+ -- entity in the current scope, because it will be needed if build-
+ -- in-place functions are called in the expanded code.
+
+ if Nkind (Parent (N)) = N_Object_Declaration
+ and then Has_Task (Typ)
+ then
+ Build_Master_Entity (Defining_Identifier (Parent (N)));
+ end if;
+
-- STEP 1: Process component associations
-- For those associations that may generate a loop, initialize