diff options
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r-- | gcc/ada/einfo.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index b45279f9cce..5f613dc3efd 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -4678,6 +4678,15 @@ package body Einfo is S : Entity_Id; begin + -- The following test is an error defense against some syntax + -- errors that can leave scopes very messed up. + + if Id = Standard_Standard then + return Id; + end if; + + -- Normal case, search enclosing scopes + S := Scope (Id); while S /= Standard_Standard and then not Is_Dynamic_Scope (S) |