aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-06-24 11:15:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-06-24 11:15:17 +0200
commit950d217a1ce57c2d8cdc4b54f73515409a0dbf18 (patch)
tree457c6c4d8bef46c8bb6dd48f175232555e39ec22 /gcc/ada/sem_res.adb
parentdd3e1ff52932c9093fa88a9dac4fd586536c4279 (diff)
downloadgcc-950d217a1ce57c2d8cdc4b54f73515409a0dbf18.zip
gcc-950d217a1ce57c2d8cdc4b54f73515409a0dbf18.tar.gz
gcc-950d217a1ce57c2d8cdc4b54f73515409a0dbf18.tar.bz2
[multiple changes]
2009-06-24 Javier Miranda <miranda@adacore.com> * exp_ch4.adb (Expand_N_Type_Conversion): return immediately from processing the type conversion when the node is replaced by an N_Raise_Program_Error node. 2009-06-24 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Designates_From_With_Type): New routine. (Process_Formals): Since anonymous access types are no longer flagged as from with types, traverse the designated type to determine whether it is coming from a limited view. * sem_res.adb: Remove with and use clauses for Sem_Ch10. (Full_Designated_Type): Use Available_View to extract the non-limited / full view of a type. From-SVN: r148899
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index a662d5b..c797d8c 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -9620,26 +9620,19 @@ package body Sem_Res is
--------------------------
function Full_Designated_Type (T : Entity_Id) return Entity_Id is
- Desig : Entity_Id := Designated_Type (T);
+ Desig : constant Entity_Id := Designated_Type (T);
begin
+ -- Handle the limited view of a type
+
if Is_Incomplete_Type (Desig)
and then From_With_Type (Desig)
and then Present (Non_Limited_View (Desig))
then
- Desig := Non_Limited_View (Desig);
-
- -- The shadow entity's non-limited view may designate an
- -- incomplete type.
-
- if Is_Incomplete_Type (Desig)
- and then Present (Full_View (Desig))
- then
- Desig := Full_View (Desig);
- end if;
+ return Available_View (Desig);
+ else
+ return Desig;
end if;
-
- return Desig;
end Full_Designated_Type;
-- Local Declarations