summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 10:33:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 10:33:29 +0000
commit6ac73d7e93955c6e434296b76c5a0778cc604297 (patch)
tree2fc8ae881b5aee9d799c7dc5954dd3e84bcdca81 /gcc/ada/lib-xref.adb
parent0edf21d409f18fe23cf89ca1adc936c24d961bec (diff)
downloadgcc-6ac73d7e93955c6e434296b76c5a0778cc604297.tar.gz
2008-08-01 Robert Dewar <dewar@adacore.com>
* lib-xref.adb: Add error defense. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138507 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 8af553fef59..2ab83c53aa8 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1834,7 +1834,11 @@ package body Lib.Xref is
Par : Node_Id;
begin
- if Ekind (Scope (E)) /= E_Generic_Package then
+ -- The Present check here is an error defense
+
+ if Present (Scope (E))
+ and then Ekind (Scope (E)) /= E_Generic_Package
+ then
return False;
end if;