diff options
author | Javier Miranda <miranda@adacore.com> | 2008-05-28 12:36:07 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-28 14:36:07 +0200 |
commit | 8c3dd7a8feca9a952b4438eafff304c2c838f3d4 (patch) | |
tree | 919d682fa4c75bb46da5b0e9bb5801ae31d06795 | |
parent | 33db2060b08b71034b5fb5eea16a87f473b32246 (diff) | |
download | gcc-8c3dd7a8feca9a952b4438eafff304c2c838f3d4.zip gcc-8c3dd7a8feca9a952b4438eafff304c2c838f3d4.tar.gz gcc-8c3dd7a8feca9a952b4438eafff304c2c838f3d4.tar.bz2 |
sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support for user-defined predefined primitives.
2008-05-28 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support
for user-defined predefined primitives.
* sem_util.adb (Matches_Prefixed_View_Profile): Ditto.
(Find_Overridden_Synchronized_Primitive): Ditto.
* sem_ch6.adb (Check_Synchronized_Overriding): Ditto.
From-SVN: r136072
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch6.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 13 |
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 411f7fc..98ca249 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2008-05-28 Javier Miranda <miranda@adacore.com> + + * sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support + for user-defined predefined primitives. + + * sem_util.adb (Matches_Prefixed_View_Profile): Ditto. + (Find_Overridden_Synchronized_Primitive): Ditto. + + * sem_ch6.adb (Check_Synchronized_Overriding): Ditto. + 2008-05-27 Arnaud Charlet <charlet@adacore.com> * a-ststio.adb, s-direio.adb: diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 4f61821..0c445db 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -11391,7 +11391,9 @@ package body Sem_Ch3 is while Present (Prim_Elmt) loop Iface_Subp := Node (Prim_Elmt); - if not Is_Predefined_Dispatching_Operation (Iface_Subp) then + if not Is_Predefined_Dispatching_Operation (Iface_Subp) + or else Comes_From_Source (Iface_Subp) + then E := Find_Primitive_Covering_Interface (Tagged_Type => Tagged_Type, Iface_Prim => Iface_Subp); diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index f8bd8d4..afd6451 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -6434,6 +6434,10 @@ package body Sem_Ch6 is elsif Present (First_Formal (Def_Id)) then Formal_Typ := Etype (First_Formal (Def_Id)); + if Is_Access_Type (Formal_Typ) then + Formal_Typ := Directly_Designated_Type (Formal_Typ); + end if; + if Is_Concurrent_Type (Formal_Typ) and then not Is_Generic_Actual_Type (Formal_Typ) then diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 895491e..26470b6 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -3034,9 +3034,18 @@ package body Sem_Util is while Present (Iface_Param) and then Present (Prim_Param) loop Iface_Id := Defining_Identifier (Iface_Param); Iface_Typ := Find_Parameter_Type (Iface_Param); + + if Is_Access_Type (Iface_Typ) then + Iface_Typ := Directly_Designated_Type (Iface_Typ); + end if; + Prim_Id := Defining_Identifier (Prim_Param); Prim_Typ := Find_Parameter_Type (Prim_Param); + if Is_Access_Type (Prim_Typ) then + Prim_Typ := Directly_Designated_Type (Prim_Typ); + end if; + -- Case of multiple interface types inside a parameter profile -- (Obj_Param : in out Iface; ...; Param : Iface) @@ -3099,6 +3108,10 @@ package body Sem_Util is return Empty; end if; + if Is_Access_Type (Tag_Typ) then + Tag_Typ := Directly_Designated_Type (Tag_Typ); + end if; + -- Traverse the homonym chain, looking at a potentially overridden -- subprogram that belongs to an implemented interface. |