summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-nmsc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-25 08:36:28 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-25 08:36:28 +0000
commitd8d8b098db921d587514077c49a920e1e85cd179 (patch)
tree9a85d5b640c111e7c7c0b22fa44fe2534b148ab8 /gcc/ada/prj-nmsc.adb
parentead350b5314f68c8b4d223e2033cfb77cc7d1185 (diff)
downloadgcc-d8d8b098db921d587514077c49a920e1e85cd179.tar.gz
2009-06-25 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case 'Access and Unchecked_Access): If the context is an interface type, and the prefix is of the corresponding class-wide type, do not insert a conversion because the pointer displacement has already taken place, and we must retain the class-wide type in a dispatching context. 2009-06-25 Emmanuel Briot <briot@adacore.com> * prj-nmsc.adb, prj-env.adb (Override_Kind): Unset the unit field of the previous source file. (Create_Mapping): Iterate on sources rather than on units. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r--gcc/ada/prj-nmsc.adb11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 0f5cf320da2..9b345b4beec 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -7324,13 +7324,16 @@ package body Prj.Nmsc is
-------------------
procedure Override_Kind (Source : Source_Id; Kind : Source_Kind) is
+ Unit : constant Unit_Index := Source.Unit;
begin
-- Remove reference in the unit, if necessary
- if Source.Unit /= null
+ if Unit /= null
and then Source.Kind in Spec_Or_Body
+ and then Unit.File_Names (Source.Kind) /= null
then
- Source.Unit.File_Names (Source.Kind) := null;
+ Unit.File_Names (Source.Kind).Unit := No_Unit_Index;
+ Unit.File_Names (Source.Kind) := null;
end if;
Source.Kind := Kind;
@@ -7821,10 +7824,6 @@ package body Prj.Nmsc is
then
OK := True;
Source.Locally_Removed := True;
-
- Name_Len := 1;
- Name_Buffer (1 .. Name_Len) := "/";
- Source.Path.Name := Name_Find;
Source.In_Interfaces := False;
if Current_Verbosity = High then