summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
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;