sem_ch8.adb (Find_Type): In case of tagged types that are concurrent types use the...
authorJavier Miranda <miranda@adacore.com>
Fri, 9 Dec 2005 17:21:38 +0000 (18:21 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 9 Dec 2005 17:21:38 +0000 (18:21 +0100)
2005-12-05  Javier Miranda  <miranda@adacore.com>

* sem_ch8.adb (Find_Type): In case of tagged types that are concurrent
types use the corresponding record type. This was not needed before
the implementation of Ada 2005 synchronized types because
concurrent types were never tagged types in Ada 95.

From-SVN: r108304

gcc/ada/sem_ch8.adb

index a0b0f38e6030d13e1ec72fab41651ce5e5c4df1a..9af04a761dac459a90765e03538246f70f3bf333 100644 (file)
@@ -4684,7 +4684,13 @@ package body Sem_Ch8 is
             --  Case of tagged type
 
             else
-               C := Class_Wide_Type (Entity (Prefix (N)));
+               if Is_Concurrent_Type (T) then
+                  C := Class_Wide_Type
+                         (Corresponding_Record_Type (Entity (Prefix (N))));
+               else
+                  C := Class_Wide_Type (Entity (Prefix (N)));
+               end if;
+
                Set_Entity_With_Style_Check (N, C);
                Generate_Reference (C, N);
                Set_Etype (N, C);