[multiple changes]

2010-10-26  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb, exp_prag.adb, sem_ch3.adb, exp_atag.adb, layout.adb,
	sem_dist.adb, exp_ch7.adb, exp_util.adb, exp_attr.adb, exp_ch9.adb,
	sem_ch10.adb, checks.adb, sem_prag.adb, par-endh.adb, sem_ch12.adb,
	exp_smem.adb, sem_attr.adb, exp_ch4.adb, exp_ch6.adb, exp_ch8.adb,
	sem_ch6.adb, exp_disp.adb, exp_aggr.adb, exp_dist.adb, sem_ch13.adb,
	par-ch3.adb, par-ch5.adb, exp_strm.adb, exp_ch3.adb: Minor reformatting
	* opt.ads: Minor comment fix.

2010-10-26  Vincent Celier  <celier@adacore.com>

	* gnat_ugn.texi: Document option -s for gnatlink.

From-SVN: r165963
This commit is contained in:
Arnaud Charlet 2010-10-26 15:20:47 +02:00
parent dc718e52b9
commit 7675ad4f6a
32 changed files with 389 additions and 507 deletions

View File

@ -1,3 +1,17 @@
2010-10-26 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, exp_prag.adb, sem_ch3.adb, exp_atag.adb, layout.adb,
sem_dist.adb, exp_ch7.adb, exp_util.adb, exp_attr.adb, exp_ch9.adb,
sem_ch10.adb, checks.adb, sem_prag.adb, par-endh.adb, sem_ch12.adb,
exp_smem.adb, sem_attr.adb, exp_ch4.adb, exp_ch6.adb, exp_ch8.adb,
sem_ch6.adb, exp_disp.adb, exp_aggr.adb, exp_dist.adb, sem_ch13.adb,
par-ch3.adb, par-ch5.adb, exp_strm.adb, exp_ch3.adb: Minor reformatting
* opt.ads: Minor comment fix.
2010-10-26 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Document option -s for gnatlink.
2010-10-26 Robert Dewar <dewar@adacore.com>
* opt.ads: Move documentation on checksum stuff here from prj-nmsc

View File

@ -2419,14 +2419,14 @@ package body Checks is
-- one of the stored discriminants, this will provide the
-- required consistency check.
Append_Elmt (
Make_Selected_Component (Loc,
Prefix =>
Append_Elmt
(Make_Selected_Component (Loc,
Prefix =>
Duplicate_Subexpr_No_Checks
(Expr, Name_Req => True),
Selector_Name =>
Make_Identifier (Loc, Chars (Discr))),
New_Constraints);
New_Constraints);
else
-- Discriminant of more remote ancestor ???

View File

@ -2226,8 +2226,7 @@ package body Exp_Aggr is
Prefix =>
New_Reference_To (
Associated_Final_Chain (Etype (Alloc)), Loc),
Selector_Name =>
Make_Identifier (Loc, Name_F));
Selector_Name => Make_Identifier (Loc, Name_F));
elsif Present (Flist) then
External_Final_List := New_Copy_Tree (Flist);
@ -2392,7 +2391,7 @@ package body Exp_Aggr is
Make_Identifier (Loc, Name_uController));
F :=
Make_Selected_Component (Loc,
Prefix => F,
Prefix => F,
Selector_Name => Make_Identifier (Loc, Name_F));
Attach := Make_Integer_Literal (Loc, 1);
@ -3001,15 +3000,14 @@ package body Exp_Aggr is
if Needs_Finalization (Comp_Type) then
Internal_Final_List :=
Make_Selected_Component (Loc,
Prefix => Convert_To (
Scope (Original_Record_Component (Selector)),
New_Copy_Tree (Target)),
Selector_Name =>
Make_Identifier (Loc, Name_uController));
Prefix => Convert_To
(Scope (Original_Record_Component (Selector)),
New_Copy_Tree (Target)),
Selector_Name => Make_Identifier (Loc, Name_uController));
Internal_Final_List :=
Make_Selected_Component (Loc,
Prefix => Internal_Final_List,
Prefix => Internal_Final_List,
Selector_Name => Make_Identifier (Loc, Name_F));
-- The internal final list can be part of a constant object

View File

@ -83,8 +83,7 @@ package body Exp_Atag is
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uC),
Name => Make_Identifier (Loc, Name_uC),
Expression =>
Make_Function_Call (Loc,
Name => New_Occurrence_Of (RTE (RE_Get_Prim_Op_Kind), Loc),
@ -112,26 +111,23 @@ package body Exp_Atag is
Make_Or_Else (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Left_Opnd => Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (RE_POK_Procedure), Loc)),
Right_Opnd =>
Make_Or_Else (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Left_Opnd => Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (
RE_POK_Protected_Procedure), Loc)),
New_Reference_To
(RTE (RE_POK_Protected_Procedure), Loc)),
Right_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Left_Opnd => Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (
RE_POK_Task_Procedure), Loc)))),
New_Reference_To
(RTE (RE_POK_Task_Procedure), Loc)))),
Then_Statements =>
New_List (
@ -319,12 +315,11 @@ package body Exp_Atag is
New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name =>
Make_Identifier (Loc,
Chars => Name_Op_Subtract)),
Make_Identifier (Loc, Name_Op_Subtract)),
Parameter_Associations => New_List (
Ctrl_Tag,
New_Reference_To (RTE (RE_DT_Predef_Prims_Offset),
Loc)))))),
New_Reference_To
(RTE (RE_DT_Predef_Prims_Offset), Loc)))))),
Expressions =>
New_List (Make_Integer_Literal (Loc, Position)));
end Build_Get_Predefined_Prim_Op_Address;
@ -764,15 +759,15 @@ package body Exp_Atag is
Make_Function_Call (Loc,
Name =>
Make_Expanded_Name (Loc,
Chars => Name_Op_Subtract,
Prefix => New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name => Make_Identifier (Loc,
Chars => Name_Op_Subtract)),
Chars => Name_Op_Subtract,
Prefix =>
New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
Parameter_Associations => New_List (
Unchecked_Convert_To (RTE (RE_Address), Tag_Node),
New_Reference_To (RTE (RE_DT_Offset_To_Top_Offset),
Loc)))));
New_Reference_To
(RTE (RE_DT_Offset_To_Top_Offset), Loc)))));
end Build_Offset_To_Top;
------------------------------------------
@ -867,15 +862,15 @@ package body Exp_Atag is
Make_Function_Call (Loc,
Name =>
Make_Expanded_Name (Loc,
Chars => Name_Op_Subtract,
Prefix => New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name => Make_Identifier (Loc,
Chars => Name_Op_Subtract)),
Chars => Name_Op_Subtract,
Prefix =>
New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
Parameter_Associations => New_List (
Unchecked_Convert_To (RTE (RE_Address), Iface_Tag),
New_Reference_To (RTE (RE_DT_Offset_To_Top_Offset),
Loc))))),
New_Reference_To
(RTE (RE_DT_Offset_To_Top_Offset), Loc))))),
Offset_Value);
end Build_Set_Static_Offset_To_Top;
@ -898,9 +893,7 @@ package body Exp_Atag is
Prefix =>
New_Reference_To
(RTU_Entity (System_Storage_Elements), Loc),
Selector_Name =>
Make_Identifier (Loc,
Chars => Name_Op_Subtract)),
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
Parameter_Associations => New_List (
Tag_Node_Addr,

View File

@ -1882,16 +1882,13 @@ package body Exp_Attr is
Make_Pragma (Loc,
Chars => Name_Import,
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc,
Expression => Lang),
Make_Pragma_Argument_Association (Loc, Expression => Lang),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc, Chars (Ent))),
Expression => Make_Identifier (Loc, Chars (Ent))),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_String_Literal (Loc, Str))))));
Expression => Make_String_Literal (Loc, Str))))));
Set_Entity (N, Ent);
Rewrite (N, New_Occurrence_Of (Ent, Loc));
@ -3533,16 +3530,16 @@ package body Exp_Attr is
Object_Parm :=
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (New_Itype,
New_Reference_To
(First_Entity
(Protected_Body_Subprogram (Subprg)),
Loc)),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (New_Itype,
New_Reference_To
(First_Entity
(Protected_Body_Subprogram (Subprg)),
Loc)),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access);
end;
@ -3557,8 +3554,7 @@ package body Exp_Attr is
(First_Entity
(Protected_Body_Subprogram (Subprg)),
Loc),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access);
end if;

View File

@ -580,7 +580,7 @@ package body Exp_Ch3 is
begin
Comp :=
Make_Indexed_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Expressions => Index_List);
if Needs_Simple_Initialization (Comp_Type) then
@ -645,7 +645,7 @@ package body Exp_Ch3 is
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Name_Range,
Expressions => New_List (
Expressions => New_List (
Make_Integer_Literal (Loc, N))))),
Statements => Init_One_Dimension (N + 1)));
end if;
@ -872,8 +872,8 @@ package body Exp_Ch3 is
Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => M_Id,
Subtype_Mark => New_Reference_To (Standard_Integer, Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Subtype_Mark => New_Reference_To (Standard_Integer, Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Insert_Before (P, Decl);
Analyze (Decl);
@ -938,8 +938,7 @@ package body Exp_Ch3 is
-- Replace the discriminant which controls the variant, with the name
-- of the formal of the checking function.
Set_Expression (Case_Node,
Make_Identifier (Loc, Chars (Case_Id)));
Set_Expression (Case_Node, Make_Identifier (Loc, Chars (Case_Id)));
Choice := First (Discrete_Choices (Variant));
@ -1712,8 +1711,8 @@ package body Exp_Ch3 is
Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => M_Id,
Subtype_Mark => New_Reference_To (RTE (RE_Master_Id), Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Subtype_Mark => New_Reference_To (RTE (RE_Master_Id), Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Insert_Before (N, Decl);
Analyze (Decl);
return M_Id;
@ -1861,7 +1860,7 @@ package body Exp_Ch3 is
Loc := Sloc (N);
Lhs :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => New_Occurrence_Of (Id, Loc));
Set_Assignment_OK (Lhs);
@ -2162,11 +2161,11 @@ package body Exp_Ch3 is
Make_Simple_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uO),
Selector_Name => New_Reference_To
(Iface_Comp, Loc)),
Prefix => Make_Identifier (Loc, Name_uO),
Selector_Name =>
New_Reference_To (Iface_Comp, Loc)),
Attribute_Name => Name_Position)))));
Set_Ekind (Func_Id, E_Function);
@ -2446,7 +2445,7 @@ package body Exp_Ch3 is
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
New_Reference_To
(First_Tag_Component (Rec_Type), Loc)),
@ -2501,7 +2500,7 @@ package body Exp_Ch3 is
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
New_Reference_To
(First_Tag_Component (Rec_Type), Loc)),
@ -2863,14 +2862,13 @@ package body Exp_Ch3 is
Append_To (Statement_List,
Make_Assignment_Statement (Loc,
Name => Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Expression => Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uATCB)),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uATCB)),
Attribute_Name => Name_Unchecked_Access)));
end if;
@ -2914,12 +2912,12 @@ package body Exp_Ch3 is
RTE (RE_Bind_Interrupt_To_Entry), Loc),
Parameter_Associations => New_List (
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Entry_Index_Expression (
Loc, Ent, Empty, Task_Type),
Entry_Index_Expression
(Loc, Ent, Empty, Task_Type),
Expression (Vis_Decl))));
end if;
end if;
@ -5757,13 +5755,12 @@ package body Exp_Ch3 is
Pos_Expr :=
Convert_To (Standard_Integer,
Make_Op_Subtract (Loc,
Left_Opnd =>
Unchecked_Convert_To (Ityp,
Make_Identifier (Loc, Name_uA)),
Right_Opnd =>
Make_Integer_Literal (Loc,
Intval =>
Enumeration_Rep (First_Literal (Typ)))));
Left_Opnd =>
Unchecked_Convert_To
(Ityp, Make_Identifier (Loc, Name_uA)),
Right_Opnd =>
Make_Integer_Literal (Loc,
Intval => Enumeration_Rep (First_Literal (Typ)))));
end if;
Append_To (Lst,
@ -5856,8 +5853,8 @@ package body Exp_Ch3 is
Statements => New_List (
Make_Case_Statement (Loc,
Expression =>
Unchecked_Convert_To (Ityp,
Make_Identifier (Loc, Name_uA)),
Unchecked_Convert_To
(Ityp, Make_Identifier (Loc, Name_uA)),
Alternatives => Lst))));
Set_TSS (Typ, Fent);
@ -7972,7 +7969,7 @@ package body Exp_Ch3 is
Make_Case_Statement (Loc,
Expression =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Prefix => Make_Identifier (Loc, Name_X),
Selector_Name => New_Copy (Name (Variant_Part (CL)))),
Alternatives => Alt_List));
end if;
@ -8034,14 +8031,12 @@ package body Exp_Ch3 is
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Selector_Name =>
Make_Identifier (Loc, Field_Name)),
Selector_Name => Make_Identifier (Loc, Field_Name)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_Y),
Selector_Name =>
Make_Identifier (Loc, Field_Name))));
Selector_Name => Make_Identifier (Loc, Field_Name))));
end if;
Next_Non_Pragma (C);
@ -8811,7 +8806,7 @@ package body Exp_Ch3 is
Make_Simple_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Prefix => Make_Identifier (Loc, Name_X),
Attribute_Name => Name_Alignment)))));
Append_To (Res, Decl);
@ -8834,7 +8829,7 @@ package body Exp_Ch3 is
Make_Simple_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Prefix => Make_Identifier (Loc, Name_X),
Attribute_Name => Name_Size)))));
Append_To (Res, Decl);

View File

@ -1504,12 +1504,12 @@ package body Exp_Ch4 is
L :=
Make_Indexed_Component (Loc,
Prefix => Make_Identifier (Loc, Chars (A)),
Prefix => Make_Identifier (Loc, Chars (A)),
Expressions => Index_List1);
R :=
Make_Indexed_Component (Loc,
Prefix => Make_Identifier (Loc, Chars (B)),
Prefix => Make_Identifier (Loc, Chars (B)),
Expressions => Index_List2);
Test := Expand_Composite_Equality
@ -3237,10 +3237,9 @@ package body Exp_Ch4 is
Flist :=
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
New_Reference_To (Associated_Final_Chain (PtrT), Loc),
Selector_Name =>
Make_Identifier (Loc, Name_F));
Selector_Name => Make_Identifier (Loc, Name_F));
Coext_Elmt := First_Elmt (Coextensions (N));
while Present (Coext_Elmt) loop
@ -5570,12 +5569,10 @@ package body Exp_Ch4 is
then
-- Enclosing record is an Unchecked_Union, use formal A
if Is_Unchecked_Union (Scope
(Entity (Selector_Name (Lhs))))
if Is_Unchecked_Union
(Scope (Entity (Selector_Name (Lhs))))
then
Lhs_Discr_Val :=
Make_Identifier (Loc,
Chars => Name_A);
Lhs_Discr_Val := Make_Identifier (Loc, Name_A);
-- Enclosing record is of a non-Unchecked_Union type, it is
-- possible to reference the discriminant.
@ -5614,9 +5611,7 @@ package body Exp_Ch4 is
if Is_Unchecked_Union
(Scope (Entity (Selector_Name (Rhs))))
then
Rhs_Discr_Val :=
Make_Identifier (Loc,
Chars => Name_B);
Rhs_Discr_Val := Make_Identifier (Loc, Name_B);
else
Rhs_Discr_Val :=
@ -8046,7 +8041,8 @@ package body Exp_Ch4 is
while Present (Disc) loop
Append_To (Cons,
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr_Move_Checks (Operand),
Prefix =>
Duplicate_Subexpr_Move_Checks (Operand),
Selector_Name =>
Make_Identifier (Loc, Chars (Disc))));
Next_Discriminant (Disc);

View File

@ -1332,7 +1332,7 @@ package body Exp_Ch5 is
else
Expr :=
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr (Rhs),
Prefix => Duplicate_Subexpr (Rhs),
Selector_Name =>
Make_Identifier (Loc, Chars (Name (VP))));
end if;
@ -1986,14 +1986,12 @@ package body Exp_Ch5 is
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr (Lhs),
Selector_Name =>
Make_Identifier (Loc,
Chars => Name_uTag)),
Make_Identifier (Loc, Name_uTag)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr (Rhs),
Selector_Name =>
Make_Identifier (Loc,
Chars => Name_uTag))),
Make_Identifier (Loc, Name_uTag))),
Reason => CE_Tag_Check_Failed));
end if;
@ -2909,7 +2907,7 @@ package body Exp_Ch5 is
Right_Opnd => Make_Selected_Component (Loc,
Prefix => New_Occurrence_Of (Pack, Loc),
Selector_Name =>
Make_Identifier (Loc, Chars => Name_No_Element)));
Make_Identifier (Loc, Name_No_Element)));
if Of_Present (I_Spec) then
@ -3751,7 +3749,7 @@ package body Exp_Ch5 is
if Has_Controlled_Component (T) then
Prev_Ref :=
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr_No_Checks (L),
Selector_Name =>
@ -3895,7 +3893,7 @@ package body Exp_Ch5 is
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Unchecked_Convert_To (RTE (RE_Finalizable),
New_Copy_Tree (Ctrl_Ref)),
Selector_Name => Make_Identifier (Loc, Name_Prev)),
@ -3905,7 +3903,7 @@ package body Exp_Ch5 is
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Unchecked_Convert_To (RTE (RE_Finalizable),
New_Copy_Tree (Ctrl_Ref)),
Selector_Name => Make_Identifier (Loc, Name_Next)),

View File

@ -5631,9 +5631,7 @@ package body Exp_Ch6 is
Proc : Entity_Id;
begin
Rec :=
Make_Identifier (Loc,
Chars => Name_uObject);
Rec := Make_Identifier (Loc, Name_uObject);
Set_Etype (Rec, Corresponding_Record_Type (Scop));
-- Find enclosing protected operation, and retrieve its first parameter,
@ -6105,9 +6103,8 @@ package body Exp_Ch6 is
Make_Op_Ne (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr (Exp),
Selector_Name =>
Make_Identifier (Loc, Chars => Name_uTag)),
Prefix => Duplicate_Subexpr (Exp),
Selector_Name => Make_Identifier (Loc, Name_uTag)),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Base_Type (Utyp), Loc),
@ -6233,8 +6230,7 @@ package body Exp_Ch6 is
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr (Exp),
Selector_Name =>
Make_Identifier (Loc, Chars => Name_uTag)),
Selector_Name => Make_Identifier (Loc, Name_uTag)),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>

View File

@ -1701,7 +1701,7 @@ package body Exp_Ch7 is
return
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Make_Selected_Component (Loc,
Prefix => R,
Selector_Name => Make_Identifier (Loc, Name_uController)),
@ -2308,10 +2308,10 @@ package body Exp_Ch7 is
Name => Name,
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Prefix =>
Make_Selected_Component (Loc,
Prefix => New_Reference_To (
Defining_Identifier (Param), Loc),
Prefix =>
New_Reference_To (Defining_Identifier (Param), Loc),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access))));
@ -2605,9 +2605,9 @@ package body Exp_Ch7 is
Defining_Identifier => Index,
Discrete_Subtype_Definition =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Attribute_Name => Name_Range,
Expressions => New_List (
Expressions => New_List (
Make_Integer_Literal (Loc, N))),
Reverse_Present => Prim = Finalize_Case)),
Statements => One_Dimension (N + 1)));
@ -2747,17 +2747,19 @@ package body Exp_Ch7 is
Parameter_Associations =>
New_List (New_Copy_Tree (Obj_Ref))));
Append_To (Res, Make_Attach_Call (
Obj_Ref => New_Copy_Tree (Obj_Ref),
Flist_Ref => Make_Identifier (Loc, Name_L),
With_Attach => Make_Identifier (Loc, Name_B)));
Append_To (Res,
Make_Attach_Call
(Obj_Ref => New_Copy_Tree (Obj_Ref),
Flist_Ref => Make_Identifier (Loc, Name_L),
With_Attach => Make_Identifier (Loc, Name_B)));
end if;
when Adjust_Case =>
Append_List_To (Res,
Make_Adjust_Call (Controller_Ref, Controller_Typ,
Make_Identifier (Loc, Name_L),
Make_Identifier (Loc, Name_B)));
Make_Adjust_Call
(Controller_Ref, Controller_Typ,
Make_Identifier (Loc, Name_L),
Make_Identifier (Loc, Name_B)));
-- When the type is also a controlled type by itself,
-- adjust it and attach it to the finalization chain.
@ -2770,17 +2772,18 @@ package body Exp_Ch7 is
Parameter_Associations =>
New_List (New_Copy_Tree (Obj_Ref))));
Append_To (Res, Make_Attach_Call (
Obj_Ref => New_Copy_Tree (Obj_Ref),
Flist_Ref => Make_Identifier (Loc, Name_L),
With_Attach => Make_Identifier (Loc, Name_B)));
Append_To (Res,
Make_Attach_Call
(Obj_Ref => New_Copy_Tree (Obj_Ref),
Flist_Ref => Make_Identifier (Loc, Name_L),
With_Attach => Make_Identifier (Loc, Name_B)));
end if;
when Finalize_Case =>
if Is_Controlled (Typ) then
Append_To (Res,
Make_Implicit_If_Statement (Obj_Ref,
Condition => Make_Identifier (Loc, Name_B),
Condition => Make_Identifier (Loc, Name_B),
Then_Statements => New_List (
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Finalize_One), Loc),
@ -2797,9 +2800,11 @@ package body Exp_Ch7 is
end if;
Append_List_To (Res,
Make_Final_Call (Controller_Ref, Controller_Typ,
Make_Identifier (Loc, Name_B)));
Make_Final_Call
(Controller_Ref, Controller_Typ,
Make_Identifier (Loc, Name_B)));
end case;
return Res;
end Make_Deep_Record_Body;

View File

@ -409,15 +409,14 @@ package body Exp_Ch8 is
Statements => New_List (
Make_Simple_Return_Statement (Loc,
Expression =>
Expand_Record_Equality (
Id,
Expand_Record_Equality
(Id,
Typ => Typ,
Lhs =>
Make_Identifier (Loc,
Chars (First_Formal (Id))),
Make_Identifier (Loc, Chars (First_Formal (Id))),
Rhs =>
Make_Identifier (Loc,
Chars (Next_Formal (First_Formal (Id)))),
Make_Identifier
(Loc, Chars (Next_Formal (First_Formal (Id)))),
Bodies => Declarations (Decl))))));
Append (Decl, List_Containing (N));

View File

@ -673,11 +673,10 @@ package body Exp_Ch9 is
Name =>
Make_Explicit_Dereference (Loc,
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Unchecked_Convert_To (Entry_Parameters_Type (Ent),
Make_Identifier (Loc, Chars (Ptr))),
Selector_Name =>
New_Reference_To (Comp, Loc))));
Selector_Name => New_Reference_To (Comp, Loc))));
Append (Decl, Decls);
Set_Renamed_Object (Formal, New_F);
@ -719,8 +718,7 @@ package body Exp_Ch9 is
Object_Definition =>
New_Reference_To (Obj_Ptr, Loc),
Expression =>
Unchecked_Convert_To (Obj_Ptr,
Make_Identifier (Loc, Name_uO)));
Unchecked_Convert_To (Obj_Ptr, Make_Identifier (Loc, Name_uO)));
Set_Debug_Info_Needed (Defining_Identifier (Decl));
Prepend_To (Decls, Decl);
@ -1807,9 +1805,8 @@ package body Exp_Ch9 is
Actuals := New_List;
while Present (Formal) loop
Append_To (Actuals,
Make_Identifier (Loc, Chars =>
Chars (Defining_Identifier (Formal))));
Make_Identifier (Loc,
Chars => Chars (Defining_Identifier (Formal))));
Next (Formal);
end loop;
end if;
@ -1833,8 +1830,8 @@ package body Exp_Ch9 is
else
Prepend_To (Actuals,
Make_Identifier (Loc, Chars =>
Chars (Defining_Identifier (First_Form))));
Make_Identifier (Loc,
Chars => Chars (Defining_Identifier (First_Form))));
end if;
Nam := New_Reference_To (Subp_Id, Loc);
@ -2482,7 +2479,7 @@ package body Exp_Ch9 is
Cond :=
Make_Op_Le (Loc,
Left_Opnd => Make_Identifier (Loc, Name_uE),
Left_Opnd => Make_Identifier (Loc, Name_uE),
Right_Opnd => Siz);
-- Map entry queue indexes in the range of the current family
@ -2854,10 +2851,8 @@ package body Exp_Ch9 is
Make_Attribute_Reference (End_Loc,
Prefix =>
Make_Selected_Component (End_Loc,
Prefix =>
Make_Identifier (End_Loc, Name_uObject),
Selector_Name =>
Make_Identifier (End_Loc, Name_uObject)),
Prefix => Make_Identifier (End_Loc, Name_uObject),
Selector_Name => Make_Identifier (End_Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access))));
-- When exceptions can not be propagated, we never need to call
@ -2918,7 +2913,7 @@ package body Exp_Ch9 is
Make_Attribute_Reference (Han_Loc,
Prefix =>
Make_Selected_Component (Han_Loc,
Prefix =>
Prefix =>
Make_Identifier (Han_Loc, Name_uObject),
Selector_Name =>
Make_Identifier (Han_Loc, Name_uObject)),
@ -3238,9 +3233,8 @@ package body Exp_Ch9 is
Uactuals := New_List;
Pformal := First (Parameter_Specifications (P_Op_Spec));
while Present (Pformal) loop
Append (
Make_Identifier (Loc, Chars (Defining_Identifier (Pformal))),
Uactuals);
Append_To (Uactuals,
Make_Identifier (Loc, Chars (Defining_Identifier (Pformal))));
Next (Pformal);
end loop;
@ -3258,7 +3252,7 @@ package body Exp_Ch9 is
Expression =>
Make_Function_Call (Loc,
Name => Make_Identifier (Loc,
Chars (Defining_Unit_Name (N_Op_Spec))),
Chars => Chars (Defining_Unit_Name (N_Op_Spec))),
Parameter_Associations => Uactuals));
Return_Stmt :=
@ -3270,7 +3264,7 @@ package body Exp_Ch9 is
Expression => Make_Function_Call (Loc,
Name =>
Make_Identifier (Loc,
Chars (Defining_Unit_Name (N_Op_Spec))),
Chars => Chars (Defining_Unit_Name (N_Op_Spec))),
Parameter_Associations => Uactuals));
end if;
@ -3278,8 +3272,7 @@ package body Exp_Ch9 is
Unprot_Call :=
Make_Procedure_Call_Statement (Loc,
Name =>
Make_Identifier (Loc,
Chars (Defining_Unit_Name (N_Op_Spec))),
Make_Identifier (Loc, Chars (Defining_Unit_Name (N_Op_Spec))),
Parameter_Associations => Uactuals);
end if;
@ -3316,10 +3309,8 @@ package body Exp_Ch9 is
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uObject),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Prefix => Make_Identifier (Loc, Name_uObject),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access);
Lock_Stmt := Make_Procedure_Call_Statement (Loc,
@ -4572,7 +4563,7 @@ package body Exp_Ch9 is
return
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Unchecked_Convert_To (Corresponding_Record_Type (Ntyp),
New_Copy_Tree (N)),
Selector_Name => Make_Identifier (Loc, Sel));
@ -5256,8 +5247,7 @@ package body Exp_Ch9 is
New_Reference_To (RTE (RO_ST_Task_Id), Loc),
Expression =>
Make_Selected_Component (Loc,
Prefix =>
New_Copy_Tree (Tasknm),
Prefix => New_Copy_Tree (Tasknm),
Selector_Name =>
Make_Identifier (Loc, Name_uDisp_Get_Task_Id)))));
@ -5924,8 +5914,7 @@ package body Exp_Ch9 is
Make_Unchecked_Type_Conversion (Loc,
Subtype_Mark =>
New_Reference_To (RTE (RE_Communication_Block), Loc),
Expression =>
Make_Identifier (Loc, Name_uD))));
Expression => Make_Identifier (Loc, Name_uD))));
-- Generate:
-- _Disp_Asynchronous_Select (<object>, S, P'Address, D, B);
@ -6049,8 +6038,7 @@ package body Exp_Ch9 is
Make_Unchecked_Type_Conversion (Loc,
Subtype_Mark =>
New_Reference_To (RTE (RE_Communication_Block), Loc),
Expression =>
Make_Identifier (Loc, Name_uD))));
Expression => Make_Identifier (Loc, Name_uD))));
-- Generate:
-- _Disp_Asynchronous_Select (<object>, S, P'Address, D, B);
@ -8675,10 +8663,8 @@ package body Exp_Ch9 is
Make_Procedure_Call_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Chars (Obj)),
Selector_Name =>
Make_Identifier (Loc, Chars (Call_Ent))),
Prefix => Make_Identifier (Loc, Chars (Obj)),
Selector_Name => Make_Identifier (Loc, Chars (Call_Ent))),
Parameter_Associations => Actuals);
end Build_Dispatching_Call_Equivalent;
@ -8745,8 +8731,7 @@ package body Exp_Ch9 is
return
Make_Procedure_Call_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uDisp_Requeue),
Name => Make_Identifier (Loc, Name_uDisp_Requeue),
Parameter_Associations => Params);
end Build_Dispatching_Requeue;
@ -9221,10 +9206,11 @@ package body Exp_Ch9 is
Cond := Make_Op_Ne (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => Make_Indexed_Component (Loc,
Prefix => New_Reference_To (Qnam, Loc),
Expressions => New_List (New_Reference_To (J, Loc))),
Selector_Name => Make_Identifier (Loc, Name_S)),
Prefix =>
Make_Indexed_Component (Loc,
Prefix => New_Reference_To (Qnam, Loc),
Expressions => New_List (New_Reference_To (J, Loc))),
Selector_Name => Make_Identifier (Loc, Name_S)),
Right_Opnd =>
New_Reference_To (RTE (RE_Null_Task_Entry), Loc));
@ -11942,10 +11928,8 @@ package body Exp_Ch9 is
New_Reference_To (RTE (Prot_Typ), Loc),
Name =>
Make_Selected_Component (Loc,
Prefix =>
New_Reference_To (Obj_Ent, Loc),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)));
Prefix => New_Reference_To (Obj_Ent, Loc),
Selector_Name => Make_Identifier (Loc, Name_uObject)));
Add (Decl);
end;
end if;
@ -12266,7 +12250,7 @@ package body Exp_Ch9 is
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access));
@ -12379,7 +12363,7 @@ package body Exp_Ch9 is
then
Append_To (Args,
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Name_Address));
end if;
@ -12521,7 +12505,7 @@ package body Exp_Ch9 is
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access));
@ -12588,7 +12572,7 @@ package body Exp_Ch9 is
if Present (Tdef) and then Has_Pragma_Priority (Tdef) then
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uPriority)));
else
Append_To (Args,
@ -12605,10 +12589,10 @@ package body Exp_Ch9 is
if Preallocated_Stacks_On_Target then
Append_To (Args,
Make_Attribute_Reference (Loc,
Prefix => Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uStack)),
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uStack)),
Attribute_Name => Name_Address));
else
@ -12629,7 +12613,7 @@ package body Exp_Ch9 is
then
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uSize)));
else
@ -12645,7 +12629,7 @@ package body Exp_Ch9 is
then
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uTask_Info)));
else
@ -12662,7 +12646,7 @@ package body Exp_Ch9 is
Append_To (Args,
Convert_To (Standard_Integer,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uCPU))));
else
@ -12684,7 +12668,8 @@ package body Exp_Ch9 is
if Present (Tdef) and then Has_Relative_Deadline_Pragma (Tdef) then
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix =>
Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uRelative_Deadline)));
@ -12821,7 +12806,7 @@ package body Exp_Ch9 is
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)));
-- Build_Entry_Names generation flag. When set to true, the runtime
@ -13036,7 +13021,7 @@ package body Exp_Ch9 is
Expression =>
Make_Explicit_Dereference (Loc,
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
New_Reference_To (P, Loc),
Selector_Name =>
Make_Identifier (Loc, Chars (Formal)))));

View File

@ -2159,12 +2159,12 @@ package body Exp_Disp is
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To
(RTE (RE_Protected_Entry_Index), Loc),
(RTE (RE_Protected_Entry_Index), Loc),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Asynchronous_Call
RTE (RE_Asynchronous_Call), Loc),
New_Reference_To -- Asynchronous_Call
(RTE (RE_Asynchronous_Call), Loc),
New_Reference_To (Com_Block, Loc)))); -- comm block
@ -2186,7 +2186,7 @@ package body Exp_Disp is
Obj_Ref,
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uP),
Prefix => Make_Identifier (Loc, Name_uP),
Attribute_Name => Name_Address),
New_Reference_To
@ -2201,8 +2201,7 @@ package body Exp_Disp is
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uB),
Name => Make_Identifier (Loc, Name_uB),
Expression =>
Make_Unchecked_Type_Conversion (Loc,
Subtype_Mark =>
@ -2232,20 +2231,17 @@ package body Exp_Disp is
Parameter_Associations =>
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Prefix => Make_Identifier (Loc, Name_uT),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Asynchronous_Call
RTE (RE_Asynchronous_Call), Loc),
New_Reference_To -- Asynchronous_Call
(RTE (RE_Asynchronous_Call), Loc),
Make_Identifier (Loc, Name_uF)))); -- status flag
end if;
@ -2481,8 +2477,7 @@ package body Exp_Disp is
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uI),
Name => Make_Identifier (Loc, Name_uI),
Expression =>
Make_Function_Call (Loc,
Name =>
@ -2554,7 +2549,7 @@ package body Exp_Disp is
Obj_Ref,
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uP),
Prefix => Make_Identifier (Loc, Name_uP),
Attribute_Name => Name_Address),
New_Reference_To
@ -2571,8 +2566,7 @@ package body Exp_Disp is
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uF),
Name => Make_Identifier (Loc, Name_uF),
Expression =>
Make_Op_Not (Loc,
Right_Opnd =>
@ -2604,20 +2598,17 @@ package body Exp_Disp is
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Prefix => Make_Identifier (Loc, Name_uT),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Conditional_Call
RTE (RE_Conditional_Call), Loc),
New_Reference_To -- Conditional_Call
(RTE (RE_Conditional_Call), Loc),
Make_Identifier (Loc, Name_uF)))); -- status flag
end if;
@ -2832,10 +2823,8 @@ package body Exp_Disp is
New_Reference_To (RTE (RE_Address), Loc),
Expression =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id))));
Prefix => Make_Identifier (Loc, Name_uT),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id))));
-- A null body is constructed for non-task types
@ -2942,8 +2931,7 @@ package body Exp_Disp is
else
Append_To (Stmts,
Make_If_Statement (Loc,
Condition =>
Make_Identifier (Loc, Name_uF),
Condition => Make_Identifier (Loc, Name_uF),
Then_Statements =>
New_List (
@ -2969,7 +2957,7 @@ package body Exp_Disp is
Name_Unchecked_Access,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
Make_Identifier (Loc, Name_uO),
Selector_Name =>
Make_Identifier (Loc, Name_uObject))),
@ -2978,8 +2966,7 @@ package body Exp_Disp is
Subtype_Mark =>
New_Reference_To (
RTE (RE_Protected_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uA)))), -- abort status
@ -3033,70 +3020,55 @@ package body Exp_Disp is
Append_To (Stmts,
Make_If_Statement (Loc,
Condition =>
Make_Identifier (Loc, Name_uF),
Condition => Make_Identifier (Loc, Name_uF),
Then_Statements =>
New_List (
Then_Statements => New_List (
-- Call to Requeue_Protected_To_Task_Entry
-- Call to Requeue_Protected_To_Task_Entry
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (
RTE (RE_Requeue_Protected_To_Task_Entry), Loc),
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To
(RTE (RE_Requeue_Protected_To_Task_Entry), Loc),
Parameter_Associations =>
New_List (
Parameter_Associations => New_List (
Make_Unchecked_Type_Conversion (Loc, -- PEA (P)
Subtype_Mark =>
New_Reference_To (
RTE (RE_Protection_Entries_Access), Loc),
Expression =>
Make_Identifier (Loc, Name_uP)),
Make_Unchecked_Type_Conversion (Loc, -- PEA (P)
Subtype_Mark =>
New_Reference_To
(RTE (RE_Protection_Entries_Access), Loc),
Expression => Make_Identifier (Loc, Name_uP)),
Make_Selected_Component (Loc, -- O._task_id
Prefix =>
Make_Identifier (Loc, Name_uO),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Make_Selected_Component (Loc, -- O._task_id
Prefix => Make_Identifier (Loc, Name_uO),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (
RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uA)))), -- abort status
Make_Identifier (Loc, Name_uA)))), -- abort status
Else_Statements =>
New_List (
Else_Statements => New_List (
-- Call to Requeue_Task_Entry
-- Call to Requeue_Task_Entry
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Requeue_Task_Entry), Loc),
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Requeue_Task_Entry), Loc),
Parameter_Associations =>
New_List (
Parameter_Associations => New_List (
Make_Selected_Component (Loc, -- O._task_id
Prefix =>
Make_Identifier (Loc, Name_uO),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Make_Selected_Component (Loc, -- O._task_id
Prefix => Make_Identifier (Loc, Name_uO),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (
RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uA)))))); -- abort status
Make_Identifier (Loc, Name_uA)))))); -- abort status
end if;
-- Even though no declarations are needed in both cases, we allocate
@ -3318,8 +3290,7 @@ package body Exp_Disp is
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uI),
Name => Make_Identifier (Loc, Name_uI),
Expression =>
Make_Function_Call (Loc,
Name =>
@ -3432,16 +3403,13 @@ package body Exp_Disp is
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Prefix => Make_Identifier (Loc, Name_uT),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Expression => Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
Make_Identifier (Loc, Name_uD), -- delay
@ -7845,7 +7813,8 @@ package body Exp_Disp is
New_Reference_To (Node (Tag_Elmt), Loc),
Expression =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Prefix =>
Make_Identifier (Loc, Name_uInit),
Selector_Name =>
New_Reference_To (Tag_Comp, Loc))));

View File

@ -3952,8 +3952,7 @@ package body Exp_Dist is
Prefix => Request_Parameter,
Selector_Name => Name_Params))))),
Selector_Name =>
Make_Identifier (Loc, Name_Subp_Id))))));
Selector_Name => Make_Identifier (Loc, Name_Subp_Id))))));
-- Build a subprogram for RAS information lookups
@ -6540,8 +6539,7 @@ package body Exp_Dist is
Make_Aggregate (Loc,
Component_Associations => New_List (
Make_Component_Association (Loc,
Choices => New_List (
Make_Identifier (Loc, Name_Ras)),
Choices => New_List (Make_Identifier (Loc, Name_Ras)),
Expression =>
PolyORB_Support.Helpers.Build_From_Any_Call (
Underlying_RACW_Type (RAS_Type),
@ -7628,7 +7626,8 @@ package body Exp_Dist is
else
Target_Info.Object :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Chars (RCI_Locator)),
Prefix =>
Make_Identifier (Loc, Chars (RCI_Locator)),
Selector_Name =>
Make_Identifier (Loc, Name_Get_RCI_Package_Ref));
end if;
@ -7914,7 +7913,7 @@ package body Exp_Dist is
New_Occurrence_Of (RTE (RE_Get_Local_Address), Loc),
Parameter_Associations => New_List (
Make_Selected_Component (Loc,
Prefix =>
Prefix =>
New_Occurrence_Of (
Request_Parameter, Loc),
Selector_Name =>
@ -9136,24 +9135,24 @@ package body Exp_Dist is
Left_Opnd =>
Make_Op_Add (Loc,
Left_Opnd =>
OK_Convert_To (
Standard_Long_Integer,
Make_Identifier (Loc, Lnam)),
OK_Convert_To
(Standard_Long_Integer,
Make_Identifier (Loc, Lnam)),
Right_Opnd =>
OK_Convert_To (
Standard_Long_Integer,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (
RE_Get_Nested_Sequence_Length
), Loc),
Parameter_Associations =>
New_List (
New_Occurrence_Of (
Any_Parameter, Loc),
Make_Integer_Literal (Loc,
Intval => J))))),
OK_Convert_To
(Standard_Long_Integer,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (
RE_Get_Nested_Sequence_Length
), Loc),
Parameter_Associations =>
New_List (
New_Occurrence_Of (
Any_Parameter, Loc),
Make_Integer_Literal (Loc,
Intval => J))))),
Right_Opnd =>
Make_Integer_Literal (Loc, 1))))));

View File

@ -648,28 +648,20 @@ package body Exp_Prag is
(Loc,
Name_Export,
New_List
(Make_Pragma_Argument_Association
(Sloc => Loc,
Expression => Make_Identifier (Loc, Name_C)),
(Make_Pragma_Argument_Association (Loc,
Expression => Make_Identifier (Loc, Name_C)),
Make_Pragma_Argument_Association
(Sloc => Loc,
Expression =>
New_Reference_To (Excep_Internal, Loc)),
Make_Pragma_Argument_Association (Loc,
Expression =>
New_Reference_To (Excep_Internal, Loc)),
Make_Pragma_Argument_Association
(Sloc => Loc,
Expression =>
Make_String_Literal
(Sloc => Loc,
Strval => Excep_Image)),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_String_Literal (Loc, Excep_Image)),
Make_Pragma_Argument_Association
(Sloc => Loc,
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_String_Literal
(Sloc => Loc,
Strval => Excep_Image))));
Make_String_Literal (Loc, Excep_Image))));
Insert_Action (N, Export_Pragma);
Analyze (Export_Pragma);

View File

@ -93,7 +93,7 @@ package body Exp_Smem is
Name => Make_Selected_Component (Loc,
Prefix =>
New_Occurrence_Of (Shared_Var_Procs_Instance (E), Loc),
Selector_Name => Make_Identifier (Loc, Chars => N)));
Selector_Name => Make_Identifier (Loc, N)));
end Build_Shared_Var_Proc_Call;
---------------------

View File

@ -166,10 +166,10 @@ package body Exp_Strm is
Object_Definition => New_Occurrence_Of (Etype (Indx), Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Prefix =>
New_Occurrence_Of (Stream_Base_Type (Etype (Indx)), Loc),
Attribute_Name => Name_Input,
Expressions => New_List (Make_Identifier (Loc, Name_S)))));
Expressions => New_List (Make_Identifier (Loc, Name_S)))));
Append_To (Decls,
Make_Object_Declaration (Loc,
@ -179,10 +179,10 @@ package body Exp_Strm is
New_Occurrence_Of (Stream_Base_Type (Etype (Indx)), Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Prefix =>
New_Occurrence_Of (Stream_Base_Type (Etype (Indx)), Loc),
Attribute_Name => Name_Input,
Expressions => New_List (Make_Identifier (Loc, Name_S)))));
Expressions => New_List (Make_Identifier (Loc, Name_S)))));
Append_To (Ranges,
Make_Range (Loc,
@ -260,9 +260,9 @@ package body Exp_Strm is
Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Attribute_Name => Name_First,
Expressions => New_List (
Expressions => New_List (
Make_Integer_Literal (Loc, J))))));
Append_To (Stms,
@ -273,9 +273,9 @@ package body Exp_Strm is
Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Attribute_Name => Name_Last,
Expressions => New_List (
Expressions => New_List (
Make_Integer_Literal (Loc, J))))));
Next_Index (Indx);
@ -369,7 +369,7 @@ package body Exp_Strm is
Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Indexed_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Expressions => Exl)));
-- The corresponding stream attribute for the component type of the
@ -407,7 +407,7 @@ package body Exp_Strm is
Discrete_Subtype_Definition =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Attribute_Name => Name_Range,
Expressions => New_List (
@ -898,7 +898,7 @@ package body Exp_Strm is
Out_Formal :=
Make_Selected_Component (Loc,
Prefix => New_Occurrence_Of (Pnam, Loc),
Prefix => New_Occurrence_Of (Pnam, Loc),
Selector_Name => Make_Identifier (Loc, Name_V));
-- Generate Reads for the discriminants of the type. The discriminants
@ -981,7 +981,7 @@ package body Exp_Strm is
Append_To (Constrained_Stms,
Make_Assignment_Statement (Loc,
Name => Out_Formal,
Name => Out_Formal,
Expression => Make_Identifier (Loc, Name_V)));
if Is_Unchecked_Union (Typ) then
@ -1032,7 +1032,7 @@ package body Exp_Strm is
else
D_Ref :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Selector_Name => New_Occurrence_Of (Disc, Loc));
end if;
@ -1040,7 +1040,7 @@ package body Exp_Strm is
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Etype (Disc), Loc),
Attribute_Name => Name_Write,
Expressions => New_List (
Expressions => New_List (
Make_Identifier (Loc, Name_S),
D_Ref)));
@ -1251,7 +1251,7 @@ package body Exp_Strm is
else
Disc_Ref :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Selector_Name => New_Occurrence_Of (Disc, Loc));
end if;
@ -1411,7 +1411,7 @@ package body Exp_Strm is
else
D_Ref :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Selector_Name =>
New_Occurrence_Of (Entity (Name (VP)), Loc));
end if;
@ -1461,7 +1461,7 @@ package body Exp_Strm is
Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
Prefix => Make_Identifier (Loc, Name_V),
Selector_Name => New_Occurrence_Of (C, Loc))));
end Make_Field_Attribute;

View File

@ -4120,14 +4120,10 @@ package body Exp_Util is
begin
return
Make_Pragma (Loc,
Pragma_Identifier =>
Make_Identifier (Loc,
Name_Check),
Pragma_Identifier => Make_Identifier (Loc, Name_Check),
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc,
Chars => Name_Predicate)),
Expression => Make_Identifier (Loc, Name_Predicate)),
Make_Pragma_Argument_Association (Loc,
Expression => Make_Predicate_Call (Typ, Expr))));
end Make_Predicate_Check;
@ -5592,7 +5588,7 @@ package body Exp_Util is
declare
CS : constant Boolean := Comes_From_Source (N);
begin
Rewrite (N, Make_Identifier (Sloc (N), Chars => Chars (E)));
Rewrite (N, Make_Identifier (Sloc (N), Chars (E)));
Set_Entity (N, E);
Set_Comes_From_Source (N, CS);
Set_Analyzed (N, True);

View File

@ -9008,13 +9008,21 @@ units, or in @code{Import} pragmas in any Ada units.
switches.
The default linker called by gnatlink is @command{gcc} which in
turn calls the appropriate system linker.
One useful option for the linker is @option{-s}: it reduces the size of the
executable by removing all symbol table and relocation information from the
executable.
Standard options for the linker such as @option{-lmy_lib} or
@option{-Ldir} can be added as is.
For options that are not recognized by
@command{gcc} as linker options, use the @command{gcc} switches
@option{-Xlinker} or @option{-Wl,}.
Refer to the GCC documentation for
details. Here is an example showing how to generate a linker map:
details.
Here is an example showing how to generate a linker map:
@smallexample
$ ^gnatlink my_prog -Wl,-Map,MAPFILE^GNAT LINK my_prog.ali /MAP^

View File

@ -620,7 +620,7 @@ package body Layout is
Name => New_Occurrence_Of (Ent, Loc),
Parameter_Associations => New_List (
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Chars => Vname),
Prefix => Make_Identifier (Loc, Vname),
Selector_Name => New_Occurrence_Of (Comp, Loc))));
else
@ -628,7 +628,7 @@ package body Layout is
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Ent, Loc),
Parameter_Associations => New_List (
Make_Identifier (Loc, Chars => Vname)));
Make_Identifier (Loc, Vname)));
end if;
else
@ -988,7 +988,7 @@ package body Layout is
N :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Chars => Vname),
Prefix => Make_Identifier (Loc, Vname),
Selector_Name => New_Occurrence_Of (Entity (N), Loc));
-- Set the Etype attributes of the selected name and its prefix.
@ -1990,7 +1990,7 @@ package body Layout is
Make_Function_Call (Loc,
Name => New_Occurrence_Of (RMS_Ent, Loc),
Parameter_Associations => New_List (
Make_Identifier (Loc, Chars => Vname)));
Make_Identifier (Loc, Vname)));
-- If the size is represented by a constant, then the
-- expression we want is a reference to this constant
@ -2104,7 +2104,7 @@ package body Layout is
Discrim :=
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Chars => Vname),
Make_Identifier (Loc, Vname),
Selector_Name =>
New_Occurrence_Of
(Entity (Name (Vpart)), Loc));
@ -2130,10 +2130,9 @@ package body Layout is
Append (
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Chars => Vname),
Make_Identifier (Loc, Vname),
Selector_Name =>
New_Occurrence_Of
(D_Entity, Loc)),
New_Occurrence_Of (D_Entity, Loc)),
D_List);
D_Entity := Next_Discriminant (D_Entity);

View File

@ -89,7 +89,9 @@ package Opt is
Checksum_Accumulate_Token_Checksum : Boolean := True;
-- GPRBUILD
-- Set to False by gprbuild when the version of GNAT is 5.02 or before.
-- Set to False by gprbuild when the version of GNAT is 5.02 or before. If
-- this switch is False, then we do not call Accumulate_Token_Checksum, so
-- the setting of the following two flags is irrelevant.
Checksum_GNAT_6_3 : Boolean := False;
-- GPRBUILD

View File

@ -250,9 +250,7 @@ package body Ch3 is
-- and we need to fix it.
if Nkind (Ident_Node) = N_Defining_Identifier then
Ident_Node :=
Make_Identifier (Sloc (Ident_Node),
Chars => Chars (Ident_Node));
Ident_Node := Make_Identifier (Sloc (Ident_Node), Chars (Ident_Node));
end if;
-- Change identifier to defining identifier if not in error
@ -505,9 +503,7 @@ package body Ch3 is
when Tok_Left_Paren =>
Typedef_Node := P_Enumeration_Type_Definition;
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
End_Labl := Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label (Typedef_Node, End_Labl);
@ -523,9 +519,7 @@ package body Ch3 is
if Nkind (Typedef_Node) = N_Derived_Type_Definition
and then Present (Record_Extension_Part (Typedef_Node))
then
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
End_Labl := Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label
@ -541,9 +535,7 @@ package body Ch3 is
when Tok_Record =>
Typedef_Node := P_Record_Definition;
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
End_Labl := Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label (Typedef_Node, End_Labl);
@ -598,8 +590,7 @@ package body Ch3 is
Set_Limited_Present (Typedef_Node, True);
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label (Typedef_Node, End_Labl);
@ -621,8 +612,7 @@ package body Ch3 is
Set_Tagged_Present (Typedef_Node, True);
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label (Typedef_Node, End_Labl);
@ -705,8 +695,7 @@ package body Ch3 is
and then Present (Record_Extension_Part (Typedef_Node))
then
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (Ident_Node));
Make_Identifier (Token_Ptr, Chars (Ident_Node));
Set_Comes_From_Source (End_Labl, False);
Set_End_Label

View File

@ -1524,8 +1524,7 @@ package body Ch5 is
if No (Loop_Name) then
Created_Name :=
Make_Identifier (Sloc (Loop_Node),
Chars => Set_Loop_Block_Name ('L'));
Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L'));
Set_Comes_From_Source (Created_Name, False);
Set_Has_Created_Identifier (Loop_Node, True);
Set_Identifier (Loop_Node, Created_Name);
@ -1596,8 +1595,7 @@ package body Ch5 is
if No (Loop_Name) then
Created_Name :=
Make_Identifier (Sloc (Loop_Node),
Chars => Set_Loop_Block_Name ('L'));
Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L'));
Set_Comes_From_Source (Created_Name, False);
Set_Has_Created_Identifier (Loop_Node, True);
Set_Identifier (Loop_Node, Created_Name);
@ -1663,8 +1661,7 @@ package body Ch5 is
if No (Loop_Name) then
Created_Name :=
Make_Identifier (Sloc (Loop_Node),
Chars => Set_Loop_Block_Name ('L'));
Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L'));
Set_Comes_From_Source (Created_Name, False);
Set_Has_Created_Identifier (Loop_Node, True);
Set_Identifier (Loop_Node, Created_Name);
@ -1833,8 +1830,7 @@ package body Ch5 is
if No (Block_Name) then
Created_Name :=
Make_Identifier (Sloc (Block_Node),
Chars => Set_Loop_Block_Name ('B'));
Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B'));
Set_Comes_From_Source (Created_Name, False);
Set_Has_Created_Identifier (Block_Node, True);
Set_Identifier (Block_Node, Created_Name);
@ -1875,8 +1871,7 @@ package body Ch5 is
if No (Block_Name) then
Created_Name :=
Make_Identifier (Sloc (Block_Node),
Chars => Set_Loop_Block_Name ('B'));
Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B'));
Set_Comes_From_Source (Created_Name, False);
Set_Has_Created_Identifier (Block_Node, True);
Set_Identifier (Block_Node, Created_Name);

View File

@ -333,9 +333,7 @@ package body Endh is
Copy_Name (Selector_Name (N)));
else
R :=
Make_Identifier (Token_Ptr,
Chars => Chars (N));
R := Make_Identifier (Token_Ptr, Chars (N));
Set_Comes_From_Source (N, False);
return R;
end if;
@ -357,9 +355,7 @@ package body Endh is
elsif Nkind (End_Labl) = N_Defining_Identifier
or else Nkind (End_Labl) = N_Identifier
then
End_Labl :=
Make_Identifier (Token_Ptr,
Chars => Chars (End_Labl));
End_Labl := Make_Identifier (Token_Ptr, Chars (End_Labl));
elsif Nkind (End_Labl) = N_Defining_Operator_Symbol
or else Nkind (End_Labl) = N_Operator_Symbol

View File

@ -4018,9 +4018,7 @@ package body Sem_Attr is
Error_Attr;
end if;
Rewrite (N,
Make_Identifier (Sloc (N),
Chars => Name_uResult));
Rewrite (N, Make_Identifier (Sloc (N), Name_uResult));
Analyze_And_Resolve (N, Etype (PS));
else

View File

@ -2293,7 +2293,7 @@ package body Sem_Ch10 is
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc,
New_External_Name (Chars (Etype (Nam)), 'E')),
Chars => New_External_Name (Chars (Etype (Nam)), 'E')),
Expression => New_Reference_To (Standard_True, Loc)));
end if;
end if;

View File

@ -1049,7 +1049,7 @@ package body Sem_Ch12 is
-- defining identifier for it.
Decl := New_Copy_Tree (F);
Id := Make_Defining_Identifier (Sloc (F_Id), Chars => Chars (F_Id));
Id := Make_Defining_Identifier (Sloc (F_Id), Chars (F_Id));
if Nkind (F) in N_Formal_Subprogram_Declaration then
Set_Defining_Unit_Name (Specification (Decl), Id);

View File

@ -1034,8 +1034,7 @@ package body Sem_Ch13 is
Aitem :=
Make_Pragma (Loc,
Pragma_Identifier =>
Make_Identifier (Sloc (Id),
Chars => Pname),
Make_Identifier (Sloc (Id), Pname),
Class_Present => Class_Present (Aspect),
Split_PPC => Split_PPC (Aspect),
Pragma_Argument_Associations => New_List (
@ -3617,12 +3616,9 @@ package body Sem_Ch13 is
Make_Type_Conversion (Loc,
Subtype_Mark =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (T, Loc),
Prefix => New_Occurrence_Of (T, Loc),
Attribute_Name => Name_Class),
Expression =>
Make_Identifier (Loc,
Chars => Object_Name)));
Expression => Make_Identifier (Loc, Object_Name)));
Set_Entity (Expression (N), Object_Entity);
Set_Etype (Expression (N), Typ);
@ -3630,7 +3626,7 @@ package body Sem_Ch13 is
-- Invariant, replace with obj
else
Rewrite (N, Make_Identifier (Loc, Chars => Object_Name));
Rewrite (N, Make_Identifier (Loc, Object_Name));
Set_Entity (N, Object_Entity);
Set_Etype (N, Typ);
end if;
@ -3691,10 +3687,8 @@ package body Sem_Ch13 is
Assoc := New_List (
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc, Chars => Name_Invariant)),
Make_Pragma_Argument_Association (Loc,
Expression => Exp));
Expression => Make_Identifier (Loc, Name_Invariant)),
Make_Pragma_Argument_Association (Loc, Expression => Exp));
-- Add message if present in Invariant pragma
@ -3723,7 +3717,7 @@ package body Sem_Ch13 is
Append_To (Stmts,
Make_Pragma (Loc,
Pragma_Identifier =>
Make_Identifier (Loc, Chars => Name_Check),
Make_Identifier (Loc, Name_Check),
Pragma_Argument_Associations => Assoc));
-- If Inherited case and option enabled, output info msg. Note
@ -3812,10 +3806,8 @@ package body Sem_Ch13 is
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc,
Chars => Object_Name),
Parameter_Type =>
New_Occurrence_Of (Typ, Loc))));
Make_Defining_Identifier (Loc, Object_Name),
Parameter_Type => New_Occurrence_Of (Typ, Loc))));
PBody :=
Make_Subprogram_Body (Loc,
@ -3908,9 +3900,7 @@ package body Sem_Ch13 is
Exp :=
Make_Predicate_Call
(T,
Convert_To (T,
Make_Identifier (Loc, Chars => Object_Name)));
(T, Convert_To (T, Make_Identifier (Loc, Object_Name)));
-- Add call to evolving expression, using AND THEN if needed
@ -3969,7 +3959,7 @@ package body Sem_Ch13 is
procedure Replace_Type_Reference (N : Node_Id) is
begin
Rewrite (N, Make_Identifier (Loc, Chars => Object_Name));
Rewrite (N, Make_Identifier (Loc, Object_Name));
end Replace_Type_Reference;
-- Start of processing for Add_Predicates
@ -4065,7 +4055,7 @@ package body Sem_Ch13 is
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Chars => Object_Name),
Make_Defining_Identifier (Loc, Object_Name),
Parameter_Type => New_Occurrence_Of (Typ, Loc))),
Result_Definition =>
New_Occurrence_Of (Standard_Boolean, Loc));
@ -4084,7 +4074,7 @@ package body Sem_Ch13 is
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Chars => Object_Name),
Make_Defining_Identifier (Loc, Object_Name),
Parameter_Type =>
New_Occurrence_Of (Typ, Loc))),
Result_Definition =>
@ -4471,7 +4461,7 @@ package body Sem_Ch13 is
if Is_Enumeration_Type (Typ) then
Result := Get_Enum_Lit_From_Pos (Typ, V, Loc);
else
Result := Make_Integer_Literal (Loc, Intval => V);
Result := Make_Integer_Literal (Loc, V);
end if;
Set_Etype (Result, Btyp);
@ -5527,18 +5517,10 @@ package body Sem_Ch13 is
Set_Component_Clause (Fent,
Make_Component_Clause (Loc,
Component_Name =>
Make_Identifier (Loc,
Chars => Name_uTag),
Position =>
Make_Integer_Literal (Loc,
Intval => Uint_0),
First_Bit =>
Make_Integer_Literal (Loc,
Intval => Uint_0),
Component_Name => Make_Identifier (Loc, Name_uTag),
Position => Make_Integer_Literal (Loc, Uint_0),
First_Bit => Make_Integer_Literal (Loc, Uint_0),
Last_Bit =>
Make_Integer_Literal (Loc,
UI_From_Int (System_Address_Size))));
@ -6547,8 +6529,7 @@ package body Sem_Ch13 is
else
Subp_Id :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Sname, 'V'));
Make_Defining_Identifier (Loc, New_External_Name (Sname, 'V'));
Subp_Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Subp_Id,

View File

@ -5151,7 +5151,7 @@ package body Sem_Ch3 is
Loc : constant Source_Ptr := Sloc (N);
Anon : constant Entity_Id :=
Make_Defining_Identifier (Loc,
New_External_Name (Chars (Derived_Type), 'T'));
Chars => New_External_Name (Chars (Derived_Type), 'T'));
Decl : Node_Id;
begin
@ -5450,7 +5450,7 @@ package body Sem_Ch3 is
Implicit_Base :=
Make_Defining_Identifier (Sloc (Derived_Type),
New_External_Name (Chars (Derived_Type), 'B'));
Chars => New_External_Name (Chars (Derived_Type), 'B'));
-- Indicate the proper nature of the derived type. This must be done
-- before analysis of the literals, to recognize cases when a literal
@ -6102,8 +6102,9 @@ package body Sem_Ch3 is
if not Is_Private_Type (Full_View (Parent_Type))
and then (In_Open_Scopes (Scope (Parent_Type)))
then
Full_Der := Make_Defining_Identifier (Sloc (Derived_Type),
Chars (Derived_Type));
Full_Der :=
Make_Defining_Identifier
(Sloc (Derived_Type), Chars (Derived_Type));
Set_Is_Itype (Full_Der);
Set_Has_Private_Declaration (Full_Der);
Set_Has_Private_Declaration (Derived_Type);
@ -6175,8 +6176,8 @@ package body Sem_Ch3 is
and then not Is_Completion
then
Full_Der :=
Make_Defining_Identifier (Sloc (Derived_Type),
Chars => Chars (Derived_Type));
Make_Defining_Identifier
(Sloc (Derived_Type), Chars (Derived_Type));
Set_Is_Itype (Full_Der);
Set_Has_Private_Declaration (Full_Der);
Set_Has_Private_Declaration (Derived_Type);
@ -6249,8 +6250,8 @@ package body Sem_Ch3 is
-- will be installed when the enclosing child body is compiled.
Full_Der :=
Make_Defining_Identifier (Sloc (Derived_Type),
Chars => Chars (Derived_Type));
Make_Defining_Identifier
(Sloc (Derived_Type), Chars (Derived_Type));
Set_Is_Itype (Full_Der);
Build_Itype_Reference (Full_Der, N);
@ -7878,9 +7879,7 @@ package body Sem_Ch3 is
begin
-- A discriminal has the same name as the discriminant
D_Minal :=
Make_Defining_Identifier (Sloc (Discrim),
Chars => Chars (Discrim));
D_Minal := Make_Defining_Identifier (Sloc (Discrim), Chars (Discrim));
Set_Ekind (D_Minal, E_In_Parameter);
Set_Mechanism (D_Minal, Default_Mechanism);
@ -8682,8 +8681,7 @@ package body Sem_Ch3 is
New_Reference_To (Subp, Loc)),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc, Iface_Kind))));
Expression => Make_Identifier (Loc, Iface_Kind))));
-- The pragma doesn't need to be analyzed because it is internaly
-- build. It is safe to directly register it as a rep item since we
@ -13929,8 +13927,8 @@ package body Sem_Ch3 is
New_Copy (Subtype_Indication
(Parent (Partial_View))));
New_Iface := Make_Identifier (Sloc (N),
Chars (Parent_Type));
New_Iface :=
Make_Identifier (Sloc (N), Chars (Parent_Type));
Append (New_Iface, Interface_List (Def));
-- Analyze the transformed code
@ -16179,10 +16177,8 @@ package body Sem_Ch3 is
Set_Scalar_Range (T,
Make_Range (Sloc (Mod_Expr),
Low_Bound =>
Make_Integer_Literal (Sloc (Mod_Expr), 0),
High_Bound =>
Make_Integer_Literal (Sloc (Mod_Expr), M_Val - 1)));
Low_Bound => Make_Integer_Literal (Sloc (Mod_Expr), 0),
High_Bound => Make_Integer_Literal (Sloc (Mod_Expr), M_Val - 1)));
-- Properly analyze the literals for the range. We do this manually
-- because we can't go calling Resolve, since we are resolving these

View File

@ -8794,12 +8794,8 @@ package body Sem_Ch6 is
Prepend_To (Pragma_Argument_Associations (CP),
Make_Pragma_Argument_Association (Sloc (Prag),
Expression =>
Make_Identifier (Loc,
Chars => Nam)));
Set_Pragma_Identifier (CP,
Make_Identifier (Sloc (Prag),
Chars => Name_Check));
Expression => Make_Identifier (Loc, Nam)));
Set_Pragma_Identifier (CP, Make_Identifier (Sloc (Prag), Name_Check));
-- If this is inherited case and the current message starts with
-- "failed p", we change it to "failed inherited p...".

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -777,7 +777,7 @@ package body Sem_Dist is
Make_Aggregate (Loc,
Component_Associations => New_List (
Make_Component_Association (Loc,
Choices => New_List (Make_Identifier (Loc, Name_Ras)),
Choices => New_List (Make_Identifier (Loc, Name_Ras)),
Expression => Make_Null (Loc)))));
Analyze_And_Resolve (N, Target_Type);
return True;

View File

@ -6032,9 +6032,7 @@ package body Sem_Prag is
Expr := Get_Pragma_Arg (Arg1);
Newa := New_List (
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc,
Chars => Name_Assertion)),
Expression => Make_Identifier (Loc, Name_Assertion)),
Make_Pragma_Argument_Association (Sloc (Expr),
Expression => Expr));
@ -6083,14 +6081,11 @@ package body Sem_Prag is
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc,
Chars => Name_Assertion)),
Expression => Make_Identifier (Loc, Name_Assertion)),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Sloc (Policy),
Chars => Chars (Policy))))));
Make_Identifier (Sloc (Policy), Chars (Policy))))));
Set_Analyzed (N);
Set_Next_Pragma (N, Opt.Check_Policy_List);
@ -11228,9 +11223,7 @@ package body Sem_Prag is
Chars => Name_Check,
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Identifier (Loc,
Chars => Name_Precondition)),
Expression => Make_Identifier (Loc, Name_Precondition)),
Make_Pragma_Argument_Association (Sloc (Arg1),
Expression => Relocate_Node (Get_Pragma_Arg (Arg1))))));
@ -14256,9 +14249,7 @@ package body Sem_Prag is
Chars => Name_Suppress,
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Sloc (N),
Expression =>
Make_Identifier (Sloc (N),
Chars => Name_All_Checks)))));
Expression => Make_Identifier (Sloc (N), Name_All_Checks)))));
end if;
-- Nothing else to do at the current time!