diff options
Diffstat (limited to 'gcc/ada/sem_dim.adb')
-rw-r--r-- | gcc/ada/sem_dim.adb | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb index cb93fdb..b303229 100644 --- a/gcc/ada/sem_dim.adb +++ b/gcc/ada/sem_dim.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -23,30 +23,34 @@ -- -- ------------------------------------------------------------------------------ -with Aspects; use Aspects; -with Atree; use Atree; -with Einfo; use Einfo; -with Errout; use Errout; -with Exp_Util; use Exp_Util; -with Lib; use Lib; -with Namet; use Namet; -with Nlists; use Nlists; -with Nmake; use Nmake; -with Opt; use Opt; -with Rtsfind; use Rtsfind; -with Sem; use Sem; -with Sem_Aux; use Sem_Aux; -with Sem_Eval; use Sem_Eval; -with Sem_Res; use Sem_Res; -with Sem_Util; use Sem_Util; -with Sinfo; use Sinfo; -with Snames; use Snames; -with Stand; use Stand; -with Stringt; use Stringt; +with Aspects; use Aspects; +with Atree; use Atree; +with Einfo; use Einfo; +with Einfo.Entities; use Einfo.Entities; +with Einfo.Utils; use Einfo.Utils; +with Errout; use Errout; +with Exp_Util; use Exp_Util; +with Lib; use Lib; +with Namet; use Namet; +with Nlists; use Nlists; +with Nmake; use Nmake; +with Opt; use Opt; +with Rtsfind; use Rtsfind; +with Sem; use Sem; +with Sem_Aux; use Sem_Aux; +with Sem_Eval; use Sem_Eval; +with Sem_Res; use Sem_Res; +with Sem_Util; use Sem_Util; +with Sinfo; use Sinfo; +with Sinfo.Nodes; use Sinfo.Nodes; +with Sinfo.Utils; use Sinfo.Utils; +with Snames; use Snames; +with Stand; use Stand; +with Stringt; use Stringt; with Table; -with Tbuild; use Tbuild; -with Uintp; use Uintp; -with Urealp; use Urealp; +with Tbuild; use Tbuild; +with Uintp; use Uintp; +with Urealp; use Urealp; with GNAT.HTable; @@ -3761,16 +3765,20 @@ package body Sem_Dim is --------------- function System_Of (E : Entity_Id) return System_Type is - Type_Decl : constant Node_Id := Parent (E); - begin - -- Look for Type_Decl in System_Table + if Present (E) then + declare + Type_Decl : constant Node_Id := Parent (E); + begin + -- Look for Type_Decl in System_Table - for Dim_Sys in 1 .. System_Table.Last loop - if Type_Decl = System_Table.Table (Dim_Sys).Type_Decl then - return System_Table.Table (Dim_Sys); - end if; - end loop; + for Dim_Sys in 1 .. System_Table.Last loop + if Type_Decl = System_Table.Table (Dim_Sys).Type_Decl then + return System_Table.Table (Dim_Sys); + end if; + end loop; + end; + end if; return Null_System; end System_Of; |