aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2005-12-09 18:21:06 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-12-09 18:21:06 +0100
commitb5bd964f4a698b0c69a6767a35be9df22f1257a5 (patch)
tree0f3db1ac48ad611dcc8fdb4f16c60724161fc62a /gcc/ada/sem_ch12.adb
parent5b7f5b7ff963eec025fd52acc80a543d85b5af5b (diff)
downloadgcc-b5bd964f4a698b0c69a6767a35be9df22f1257a5.zip
gcc-b5bd964f4a698b0c69a6767a35be9df22f1257a5.tar.gz
gcc-b5bd964f4a698b0c69a6767a35be9df22f1257a5.tar.bz2
sem_ch12.adb (Subtypes_Match): Handle properly Ada05 arrays of anonymous access types.
2005-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Subtypes_Match): Handle properly Ada05 arrays of anonymous access types. * sem_eval.adb (Subtypes_Statically_Match): Implement new rules for matching of anonymous access types and anonymous access to subprogram types. 'R'M 4.9.1 (2/2). From-SVN: r108301
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 470f5ed..5e8e6dc 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -8090,16 +8090,22 @@ package body Sem_Ch12 is
begin
return (Base_Type (T) = Base_Type (Act_T)
--- why is the and then commented out here???
--- and then Is_Constrained (T) = Is_Constrained (Act_T)
and then Subtypes_Statically_Match (T, Act_T))
or else (Is_Class_Wide_Type (Gen_T)
and then Is_Class_Wide_Type (Act_T)
and then
- Subtypes_Match (
- Get_Instance_Of (Root_Type (Gen_T)),
- Root_Type (Act_T)));
+ Subtypes_Match
+ (Get_Instance_Of (Root_Type (Gen_T)),
+ Root_Type (Act_T)))
+
+ or else
+ ((Ekind (Gen_T) = E_Anonymous_Access_Subprogram_Type
+ or else Ekind (Gen_T) = E_Anonymous_Access_Type)
+ and then Ekind (Act_T) = Ekind (Gen_T)
+ and then
+ Subtypes_Statically_Match
+ (Designated_Type (Gen_T), Designated_Type (Act_T)));
end Subtypes_Match;
-----------------------------------------