summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-04 13:29:47 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-04 13:29:47 +0000
commiteebc188f51bf1a5f412b3dbd067867e82e3f3424 (patch)
tree024c20416dae1706175a93972688a747a359748d /gcc/ada/sem_ch6.adb
parentf7a5978d4fec56a121a430bbd0aa491044d1b423 (diff)
downloadppe42-gcc-eebc188f51bf1a5f412b3dbd067867e82e3f3424.tar.gz
ppe42-gcc-eebc188f51bf1a5f412b3dbd067867e82e3f3424.zip
2005-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Conforming_Types): If the types are anonymous access types check whether some designated type is a limited view, and use the non-limited view if available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101588 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb24
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 7d31004651c..822446e9109 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -3326,19 +3326,27 @@ package body Sem_Ch6 is
Desig_1 := Directly_Designated_Type (Type_1);
-- An access parameter can designate an incomplete type
+ -- If the incomplete type is the limited view of a type
+ -- from a limited_with_clause, check whether the non-limited
+ -- view is available.
- if Ekind (Desig_1) = E_Incomplete_Type
- and then Present (Full_View (Desig_1))
- then
- Desig_1 := Full_View (Desig_1);
+ if Ekind (Desig_1) = E_Incomplete_Type then
+ if Present (Full_View (Desig_1)) then
+ Desig_1 := Full_View (Desig_1);
+
+ elsif Present (Non_Limited_View (Desig_1)) then
+ Desig_1 := Non_Limited_View (Desig_1);
+ end if;
end if;
Desig_2 := Directly_Designated_Type (Type_2);
- if Ekind (Desig_2) = E_Incomplete_Type
- and then Present (Full_View (Desig_2))
- then
- Desig_2 := Full_View (Desig_2);
+ if Ekind (Desig_2) = E_Incomplete_Type then
+ if Present (Full_View (Desig_2)) then
+ Desig_2 := Full_View (Desig_2);
+ elsif Present (Non_Limited_View (Desig_2)) then
+ Desig_2 := Non_Limited_View (Desig_2);
+ end if;
end if;
-- The context is an instance association for a formal
OpenPOWER on IntegriCloud