From 468ee96a95a470c06e0f646f0a7c83b189b7fbe6 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 18 Oct 2010 12:14:23 +0200 Subject: [multiple changes] 2010-10-18 Robert Dewar * prj-nmsc.adb, prj.adb, sem_res.adb: Minor reformatting. 2010-10-18 Ed Schonberg * 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 * projects.texi: Add documentation for attribute Ignore_Source_Sub_Dirs From-SVN: r165623 --- gcc/ada/sem_util.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_util.adb') 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; -- cgit v1.1