summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 23:03:17 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 23:03:17 +0000
commit71b30311adf991d390a8f17e7bec75416ea5e676 (patch)
tree891a888a24f3e3925a8088ccc5a5bc3a567540ad /gcc/ada/exp_ch4.adb
parent5f260d20295334c7ccebf7844ff05620a720ecb3 (diff)
downloadgcc-71b30311adf991d390a8f17e7bec75416ea5e676.tar.gz
* exp_ch4.adb (Expand_N_Allocator): Generate meaningful names for
a dynamic task if the allocator appears in an indexed assignment or selected component assignment. * exp_util.adb (Build_Task_Array_Image, Build_Task_Record_Image): For a dynamic task in an assignment statement, use target of assignment to generate meaningful name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46166 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 2f140685afb..33c6f14468a 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.463 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- --
@@ -1818,7 +1818,10 @@ package body Exp_Ch4 is
-- If the context of the allocator is a declaration or
-- an assignment, we can generate a meaningful image for
-- it, even though subsequent assignments might remove
- -- the connection between task and entity.
+ -- the connection between task and entity. We build this
+ -- image when the left-hand side is a simple variable,
+ -- a simple indexed assignment or a simple selected
+ -- component.
if Nkind (Parent (N)) = N_Assignment_Statement then
declare
@@ -1832,6 +1835,13 @@ package body Exp_Ch4 is
New_Occurrence_Of
(Entity (Nam), Sloc (Nam)), T);
+ elsif (Nkind (Nam) = N_Indexed_Component
+ or else Nkind (Nam) = N_Selected_Component)
+ and then Is_Entity_Name (Prefix (Nam))
+ then
+ Decls :=
+ Build_Task_Image_Decls (
+ Loc, Nam, Etype (Prefix (Nam)));
else
Decls := Build_Task_Image_Decls (Loc, T, T);
end if;