aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2008-07-31 15:25:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-07-31 15:25:48 +0200
commit9febb58f8cfe49e9d2440e3c4de7beff01669299 (patch)
treef99c65afff6e2d2e7db94e72f0fafeb5982b91fb
parent37ff8abac09eb81c2ab5092399f830bc4cd65766 (diff)
downloadgcc-9febb58f8cfe49e9d2440e3c4de7beff01669299.zip
gcc-9febb58f8cfe49e9d2440e3c4de7beff01669299.tar.gz
gcc-9febb58f8cfe49e9d2440e3c4de7beff01669299.tar.bz2
sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to handle synchronized types.
2008-07-31 Javier Miranda <miranda@adacore.com> * sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to handle synchronized types. Required to handle well the object.operation notation applied to synchronized types. From-SVN: r138404
-rw-r--r--gcc/ada/sem_ch4.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 4994ac8..d6983b1 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -6380,9 +6380,15 @@ package body Sem_Ch4 is
-----------------------------
function Valid_First_Argument_Of (Op : Entity_Id) return Boolean is
- Typ : constant Entity_Id := Etype (First_Formal (Op));
+ Typ : Entity_Id := Etype (First_Formal (Op));
begin
+ if Is_Concurrent_Type (Typ)
+ and then Present (Corresponding_Record_Type (Typ))
+ then
+ Typ := Corresponding_Record_Type (Typ);
+ end if;
+
-- Simple case. Object may be a subtype of the tagged type or
-- may be the corresponding record of a synchronized type.