summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 13:22:02 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 13:22:02 +0000
commit498ac7a5423a7125c54316364b5150eb430c2bc3 (patch)
treed789ce1d1b4f979b0fcaabdc8a2627ed2a00a663 /gcc/ada
parent27aaf00a54ab3bab17d4e81f1878cc9fb3f26d10 (diff)
downloadgcc-498ac7a5423a7125c54316364b5150eb430c2bc3.tar.gz
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Output_Overridden_Op): Follow several levels of derivation when necessary, to find the user-subprogram that is actally being overridden. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/lib-xref.adb12
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d51fddbcc4e..7bddd601a15 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-29 Ed Schonberg <schonberg@adacore.com>
+
+ * lib-xref.adb (Output_Overridden_Op): Follow several levels of
+ derivation when necessary, to find the user-subprogram that is actally
+ being overridden.
+
2009-04-29 Robert Dewar <dewar@adacore.com>
* sem_util.adb (May_Be_Lvalue): Fix cases involving indexed/selected
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index c2e1c59753c..0e45e2e2bf6 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1696,8 +1696,20 @@ package body Lib.Xref is
if No (Old_E) then
return;
+ -- Follow alias chain if one is present
+
elsif Present (Alias (Old_E)) then
+
+ -- The subprogram may have been implicitly inherited
+ -- through several levels of derivation, so find the
+ -- ultimate (source) ancestor.
+
Op := Alias (Old_E);
+ while Present (Alias (Op)) loop
+ Op := Alias (Op);
+ end loop;
+
+ -- Normal case of no alias present
else
Op := Old_E;