summaryrefslogtreecommitdiff
path: root/gcc/ada/atree.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-08 11:25:03 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-08 11:25:03 +0000
commit4c9b9920409e7bd03f1e77b36b597bbc5d825494 (patch)
treee99f25badcdd4f030790964cb05f56e5ed51adf9 /gcc/ada/atree.adb
parent0e537804ef18f8188d21d9df07b35a836005248b (diff)
downloadgcc-4c9b9920409e7bd03f1e77b36b597bbc5d825494.tar.gz
* atree.adb (Visit_Itype): Create a new name for the generated itype,
because the back-end may otherwise treat it as a redefinition of the old symbol. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/atree.adb')
-rw-r--r--gcc/ada/atree.adb14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index daf0641cfe6..f8fef8ce8ed 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -39,6 +39,7 @@ pragma Style_Checks (All_Checks);
-- bodies) and the C file a-atree.c (for remaining non-inlined bodies).
with Debug; use Debug;
+with Namet; use Namet;
with Nlists; use Nlists;
with Elists; use Elists;
with Output; use Output;
@@ -809,6 +810,7 @@ package body Atree is
procedure Debug_Extend_Node;
-- Debug routine for debug flag N
+ pragma Inline (Debug_Extend_Node);
procedure Debug_Extend_Node is
begin
@@ -827,8 +829,6 @@ package body Atree is
end if;
end Debug_Extend_Node;
- pragma Inline (Debug_Extend_Node);
-
begin
pragma Assert (not (Has_Extension (Node)));
Result := Allocate_Initialize_Node (Node, With_Extension => True);
@@ -1585,6 +1585,16 @@ package body Atree is
New_Itype := New_Copy (Old_Itype);
+ -- The new Itype has all the attributes of the old one, and
+ -- we just copy the contents of the entity. However, the back-end
+ -- needs different names for debugging purposes, so we create a
+ -- new internal name by appending the letter 'c' (copy) to the
+ -- name of the original.
+
+ Get_Name_String (Chars (Old_Itype));
+ Add_Char_To_Name_Buffer ('c');
+ Set_Chars (New_Itype, Name_Enter);
+
-- If our associated node is an entity that has already been copied,
-- then set the associated node of the copy to point to the right
-- copy. If we have copied an Itype that is itself the associated