===================================================================
@@ -23,7 +23,6 @@
-- --
------------------------------------------------------------------------------
-with Aspects; use Aspects;
with Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
@@ -1726,7 +1725,6 @@
Defining_Identifier => O_Name,
Object_Definition => Make_Identifier (Loc, Chars (T)));
- Move_Aspects (N, O_Decl);
Rewrite (N, T_Decl);
Insert_After (N, O_Decl);
Mark_Rewrite_Insertion (O_Decl);
@@ -1796,7 +1794,6 @@
Defining_Identifier => O_Name,
Object_Definition => Make_Identifier (Loc, Chars (T)));
- Move_Aspects (N, O_Decl);
Rewrite (N, T_Decl);
Insert_After (N, O_Decl);
Mark_Rewrite_Insertion (O_Decl);
===================================================================
@@ -1164,7 +1164,9 @@
Pragma_Identifier =>
Make_Identifier (Sloc (Id), Pname),
Pragma_Argument_Associations =>
- New_List (Relocate_Node (Expr)));
+ New_List
+ (Make_Pragma_Argument_Association
+ (Sloc (Id), Expression => Relocate_Node (Expr))));
Set_From_Aspect_Specification (Aitem, True);
@@ -1526,6 +1528,12 @@
end if;
Prepend (Aitem, To => L);
+
+ -- Analyze rewritten pragma. Otherwise, its
+ -- analysis is done too late, after the task or
+ -- protected object has been created.
+
+ Analyze (Aitem);
end;
-- For all other cases, insert in sequence