From: Robert Dewar Date: Fri, 1 Aug 2008 10:33:29 +0000 (+0200) Subject: lib-xref.adb: Add error defense. X-Git-Tag: releases/gcc-4.4.0~3481 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30dc4313151bf70eace755004d407430c2811c94;p=thirdparty%2Fgcc.git lib-xref.adb: Add error defense. 2008-08-01 Robert Dewar * lib-xref.adb: Add error defense. From-SVN: r138507 --- diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 8af553fef599..2ab83c53aa8d 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;