diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 11:37:44 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 11:37:44 +0200 |
commit | 92817e897757f430013104a01dbbaf222f7d950a (patch) | |
tree | 497f5b4a920a207a3da99a885ebca648bd450e5b /gcc/ada/sem_disp.adb | |
parent | eada5fd1cf4179586b126a4a6cf6a0e1f6e69a01 (diff) | |
download | gcc-92817e897757f430013104a01dbbaf222f7d950a.zip gcc-92817e897757f430013104a01dbbaf222f7d950a.tar.gz gcc-92817e897757f430013104a01dbbaf222f7d950a.tar.bz2 |
[multiple changes]
2010-10-05 Emmanuel Briot <briot@adacore.com>
* prj-env.adb, prj-env.ads (Set_Path): New subprogram.
(Deep_Copy): Removed, not used.
2010-10-05 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): Code reorganization:
move code that searches in the list of primitives of a tagged type for
the entity that will be overridden by user-defined routines.
* sem_disp.adb (Find_Primitive_Covering_Interface): Move here code
previously located in routine Add_Internal_Interface_Entities.
* sem_disp.ads (Find_Primitive_Covering_Interface): Update documentation
* sem_ch6.adb (New_Overloaded_Entity): Add missing check on
availability of attribute Alias.
2010-10-05 Ed Falis <falis@adacore.com>
* s-taprop-vxworks.adb, s-osinte-vxworks.adb, s-osinte-vxworks.ads,
s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.adb, s-vxwext-rtp.ads:
Move definition of intContext to System.OS_Interface.
Add necessary variants in System.VxWorks.Extensions.
2010-10-05 Doug Rupp <rupp@adacore.com>
* s-asthan-vms-alpha.adb: On VMS, a task using
pragma AST_Entry exhibits a memory leak when the task terminates
because the vector allocated for the AST interface is not freed. Fixed
by making the vector a controlled type.
From-SVN: r164972
Diffstat (limited to 'gcc/ada/sem_disp.adb')
-rw-r--r-- | gcc/ada/sem_disp.adb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index f40df26..0cec554 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -1651,7 +1651,8 @@ package body Sem_Disp is (Tagged_Type : Entity_Id; Iface_Prim : Entity_Id) return Entity_Id is - E : Entity_Id; + E : Entity_Id; + El : Elmt_Id; begin pragma Assert (Is_Interface (Find_Dispatching_Type (Iface_Prim)) @@ -1660,6 +1661,8 @@ package body Sem_Disp is Is_Interface (Find_Dispatching_Type (Ultimate_Alias (Iface_Prim))))); + -- Search in the homonym chain + E := Current_Entity (Iface_Prim); while Present (E) loop if Is_Subprogram (E) @@ -1672,6 +1675,23 @@ package body Sem_Disp is E := Homonym (E); end loop; + -- Search in the list of primitives of the type + + El := First_Elmt (Primitive_Operations (Tagged_Type)); + while Present (El) loop + E := Node (El); + + if No (Interface_Alias (E)) + and then Alias (E) = Iface_Prim + then + return Node (El); + end if; + + Next_Elmt (El); + end loop; + + -- Not found + return Empty; end Find_Primitive_Covering_Interface; |