diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-13 14:13:19 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-13 14:13:19 +0000 |
commit | ef6f748f9b28459bd27e09edecca6eeaf42f3df7 (patch) | |
tree | a093e47020ed740781ff421875451b061f428494 /gcc/ada/exp_ch13.adb | |
parent | 2466cdbf4be6dc8d97082310f02f72f905a6c420 (diff) | |
download | gcc-ef6f748f9b28459bd27e09edecca6eeaf42f3df7.tar.gz |
2012-06-13 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 188512 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@188515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch13.adb')
-rw-r--r-- | gcc/ada/exp_ch13.adb | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch13.adb b/gcc/ada/exp_ch13.adb index 038a8442b61..26eaec28b4e 100644 --- a/gcc/ada/exp_ch13.adb +++ b/gcc/ada/exp_ch13.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -165,14 +165,30 @@ package body Exp_Ch13 is -- If the type is a task type, then assign the value of the -- storage size to the Size variable associated with the task. - -- task_typeZ := expression + -- Insert the assignment right after the declaration of the Size + -- variable. + + -- Generate: + + -- task_typeZ := expression if Ekind (Ent) = E_Task_Type then - Insert_Action (N, - Make_Assignment_Statement (Loc, - Name => New_Reference_To (Storage_Size_Variable (Ent), Loc), - Expression => - Convert_To (RTE (RE_Size_Type), Expression (N)))); + declare + Assign : Node_Id; + + begin + Assign := + Make_Assignment_Statement (Loc, + Name => + New_Reference_To (Storage_Size_Variable (Ent), Loc), + Expression => + Convert_To (RTE (RE_Size_Type), Expression (N))); + + Insert_After + (Parent (Storage_Size_Variable (Entity (N))), Assign); + + Analyze (Assign); + end; -- For Storage_Size for an access type, create a variable to hold -- the value of the specified size with name typeV and expand an |