From 0e08f7ab155784c357e1df6af5c9b57deaa0cd8f Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Tue, 27 May 2008 14:36:32 +0200 Subject: [PATCH] exp_aggr.adb (Build_Array_Aggr_Code): If component type includes tasks and context is an object declaration. 2008-05-27 Ed Schonberg * 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 --- gcc/ada/exp_aggr.adb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 08e23ab35df..40ff3796671 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 -- 2.30.2