aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 12:14:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 12:14:23 +0200
commit468ee96a95a470c06e0f646f0a7c83b189b7fbe6 (patch)
treed7fba811fa09b6de0a53d1fc0e6c4cf9f7fe6ca6 /gcc/ada/sem_util.adb
parentb7f17b2062c6e07c4236e16d124e9f1dcd34447f (diff)
downloadgcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.zip
gcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.tar.gz
gcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.tar.bz2
[multiple changes]
2010-10-18 Robert Dewar <dewar@adacore.com> * prj-nmsc.adb, prj.adb, sem_res.adb: Minor reformatting. 2010-10-18 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Insert_Explicit_Dereference): If operand is a selected component, we generate a reference to the ultimate prefix when it is an entity name. We must place the reference on the identifier for that prefix, and not on the operand itself, to prevent spurious extra references in the ali file. 2010-10-18 Vincent Celier <celier@adacore.com> * projects.texi: Add documentation for attribute Ignore_Source_Sub_Dirs From-SVN: r165623
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index c78d4a9..d278e1d 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -5585,6 +5585,7 @@ package body Sem_Util is
if Is_Entity_Name (New_Prefix) then
Ent := Entity (New_Prefix);
+ Pref := New_Prefix;
-- For a retrieval of a subcomponent of some composite object,
-- retrieve the ultimate entity if there is one.
@@ -5606,8 +5607,10 @@ package body Sem_Util is
end if;
end if;
+ -- Place the reference on the entity node.
+
if Present (Ent) then
- Generate_Reference (Ent, New_Prefix);
+ Generate_Reference (Ent, Pref);
end if;
end if;
end Insert_Explicit_Dereference;