From: Ed Schonberg Date: Tue, 27 May 2008 12:36:32 +0000 (+0200) Subject: exp_aggr.adb (Build_Array_Aggr_Code): If component type includes tasks and context... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e08f7ab155784c357e1df6af5c9b57deaa0cd8f;p=gcc.git 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 --- 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