@@ -42,7 +42,7 @@ package body Itypes is
Related_Nod : Node_Id;
Related_Id : Entity_Id := Empty;
Suffix : Character := ' ';
- Suffix_Index : Nat := 0;
+ Suffix_Index : Int := 0;
Scope_Id : Entity_Id := Current_Scope) return Entity_Id
is
Typ : Entity_Id;
@@ -110,7 +110,7 @@ package Itypes is
Related_Nod : Node_Id;
Related_Id : Entity_Id := Empty;
Suffix : Character := ' ';
- Suffix_Index : Nat := 0;
+ Suffix_Index : Int := 0;
Scope_Id : Entity_Id := Current_Scope) return Entity_Id;
-- Used to create a new Itype
--
@@ -9453,6 +9453,7 @@ package body Sem_Ch3 is
(Derived_Type, Save_Discr_Constr);
Set_Stored_Constraint
(Derived_Type, Expand_To_Stored_Constraint (Parent_Type, Discs));
+
Replace_Components (Derived_Type, New_Decl);
end if;
@@ -13692,7 +13693,8 @@ package body Sem_Ch3 is
Related_Nod : Node_Id) return Entity_Id
is
T_Sub : constant Entity_Id :=
- Create_Itype (E_Record_Subtype, Related_Nod, Corr_Rec, 'C');
+ Create_Itype (E_Record_Subtype,
+ Related_Nod, Corr_Rec, 'C', Suffix_Index => -1);
begin
Set_Etype (T_Sub, Corr_Rec);
@@ -20997,7 +20997,7 @@ package body Sem_Util is
Sloc_Value : Source_Ptr;
Related_Id : Entity_Id;
Suffix : Character;
- Suffix_Index : Nat := 0;
+ Suffix_Index : Int := 0;
Prefix : Character := ' ') return Entity_Id
is
N : constant Entity_Id :=
@@ -24039,6 +24039,15 @@ package body Sem_Util is
and then Outer = Protected_Body_Subprogram (Curr)
then
return True;
+
+ -- OUtside of its scope, a synchronized type may just be
+ -- private.
+
+ elsif Is_Private_Type (Curr)
+ and then Present (Full_View (Curr))
+ and then Is_Concurrent_Type (Full_View (Curr))
+ then
+ return Scope_Within (Full_View (Curr), Outer);
end if;
end loop;
@@ -2326,7 +2326,7 @@ package Sem_Util is
Sloc_Value : Source_Ptr;
Related_Id : Entity_Id;
Suffix : Character;
- Suffix_Index : Nat := 0;
+ Suffix_Index : Int := 0;
Prefix : Character := ' ') return Entity_Id;
-- This function creates an N_Defining_Identifier node for an internal
-- created entity, such as an implicit type or subtype, or a record
new file mode 100644
@@ -0,0 +1,5 @@
+-- { dg-do assemble }
+
+package body Task1 is
+ procedure Dummy is null;
+end Task1;
new file mode 100644
@@ -0,0 +1,10 @@
+with Task1_Pkg; use Task1_Pkg;
+
+package Task1 is
+ TAB : constant Typ_Task_Par_Tab := (others => (Dummy => FALSE));
+
+ T1 : Typ_Task (TAB (1).Dummy);
+ T2 : Typ_Task (TAB (2).Dummy);
+
+ procedure Dummy;
+end Task1;
new file mode 100644
@@ -0,0 +1,11 @@
+package body Task1_Pkg is
+ task body Typ_Task is
+ begin
+ loop
+ null;
+ end loop;
+ end Typ_Task;
+
+begin
+ null;
+end Task1_Pkg;
new file mode 100644
@@ -0,0 +1,10 @@
+package Task1_Pkg is
+ subtype Typ_Bool is boolean;
+
+ type Typ_Task_Par is record
+ Dummy : Typ_Bool;
+ end record;
+
+ type Typ_Task_Par_Tab is array (1 .. 33) of aliased Typ_Task_Par;
+ task type Typ_Task (dummy : Typ_Bool);
+end Task1_Pkg;