aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aux.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 18:47:55 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 18:47:55 +0200
commitbb10b89181d4ad48e5dd82cf9d7c845c6206c08b (patch)
treea0b699e8fbdb91e9fc22ff301c86606763f20f0a /gcc/ada/sem_aux.adb
parent5bec9717c3c211d060c7f83dab629157755469f8 (diff)
downloadgcc-bb10b89181d4ad48e5dd82cf9d7c845c6206c08b.zip
gcc-bb10b89181d4ad48e5dd82cf9d7c845c6206c08b.tar.gz
gcc-bb10b89181d4ad48e5dd82cf9d7c845c6206c08b.tar.bz2
[multiple changes]
2010-06-22 Robert Dewar <dewar@adacore.com> * s-rannum.adb: Minor reformatting. 2010-06-22 Javier Miranda <miranda@adacore.com> * sem_aux.adb, sem_aux.ads, sem_util.adb, sem_util.ads, sem_elim.adb, exp_cg.adb: Minor code reorganization: Move routine Ultimate_Alias from package Sem_Util to package Sem_Aux. 2010-06-22 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_Secondary_DT, Make_DT): Minor code cleanup: remove useless restriction on imported routines when building the dispatch tables. 2010-06-22 Robert Dewar <dewar@adacore.com> * cstand.adb (Create_Standard): Set Has_Pragma_Pack for standard string types. 2010-06-22 Javier Miranda <miranda@adacore.com> * sem_ch4.adb (Collect_Generic_Type_Ops): Protect code that handles generic subprogram declarations to ensure proper context. Add missing support for generic actuals. (Try_Primitive_Operation): Add missing support for concurrent types that have no Corresponding_Record_Type. Required to diagnose errors compiling generics or when compiling with no code generation (-gnatc). * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): Do not build the corresponding record type. * sem_disp.ads, sem_disp.adb (Check_Dispatching_Operation): Complete documentation. Do minimum decoration when processing a primitive of a concurrent tagged type that covers interfaces. Required to diagnose errors in the Object.Operation notation compiling generics or under -gnatc. * exp_ch9.ads, exp_ch9.adb (Build_Corresponding_Record): Add missing propagation of attribute Interface_List to the corresponding record. (Expand_N_Task_Type_Declaration): Code cleanup. (Expand_N_Protected_Type_Declaration): Code cleanup. From-SVN: r161203
Diffstat (limited to 'gcc/ada/sem_aux.adb')
-rwxr-xr-xgcc/ada/sem_aux.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb
index ae08797..99bec9b 100755
--- a/gcc/ada/sem_aux.adb
+++ b/gcc/ada/sem_aux.adb
@@ -799,4 +799,20 @@ package body Sem_Aux is
Obsolescent_Warnings.Tree_Write;
end Tree_Write;
+ --------------------
+ -- Ultimate_Alias --
+ --------------------
+
+ function Ultimate_Alias (Prim : Entity_Id) return Entity_Id is
+ E : Entity_Id := Prim;
+
+ begin
+ while Present (Alias (E)) loop
+ pragma Assert (Alias (E) /= E);
+ E := Alias (E);
+ end loop;
+
+ return E;
+ end Ultimate_Alias;
+
end Sem_Aux;