From: charlet Date: Fri, 10 Jul 2009 09:10:43 +0000 (+0000) Subject: 2009-07-10 Javier Miranda X-Git-Tag: upstream/4.9.2~34947 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21ead1c68e4b1f82e39cba5197c50fe93b36480a;p=platform%2Fupstream%2Flinaro-gcc.git 2009-07-10 Javier Miranda * exp_util.adb (Find_Interface_Tag): Reorder processing of incoming Typ argument to ensure proper management of access types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149461 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index af7d0aa..97aa765 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1600,28 +1600,24 @@ package body Exp_Util is begin pragma Assert (Is_Interface (Iface)); - -- Handle private types - - if Has_Private_Declaration (Typ) - and then Present (Full_View (Typ)) - then - Typ := Full_View (Typ); - end if; - -- Handle access types if Is_Access_Type (Typ) then Typ := Directly_Designated_Type (Typ); end if; - -- Handle task and protected types implementing interfaces + -- Handle class-wide types - if Is_Concurrent_Type (Typ) then - Typ := Corresponding_Record_Type (Typ); + if Is_Class_Wide_Type (Typ) then + Typ := Root_Type (Typ); end if; - if Is_Class_Wide_Type (Typ) then - Typ := Etype (Typ); + -- Handle private types + + if Has_Private_Declaration (Typ) + and then Present (Full_View (Typ)) + then + Typ := Full_View (Typ); end if; -- Handle entities from the limited view @@ -1631,6 +1627,12 @@ package body Exp_Util is Typ := Non_Limited_View (Typ); end if; + -- Handle task and protected types implementing interfaces + + if Is_Concurrent_Type (Typ) then + Typ := Corresponding_Record_Type (Typ); + end if; + Find_Tag (Typ); pragma Assert (Found); return AI_Tag;