Commit dd8cfe3a by Arnaud Charlet

[multiple changes]

2009-04-09  Nicolas Setton  <setton@adacore.com>

	* s-osinte-darwin.ads: Fix wrong binding to struc timeval.

	* s-osinte-darwin.adb (To_Timeval): Adapt to fixed implementation of
	struct_timeval.

2009-04-09  Bob Duff  <duff@adacore.com>

	* exp_ch5.adb, exp_ch9.adb: Correct miscellaneous Slocs in
	internally-generated nodes related to select statements to avoid
	confusing the debugger.

2009-04-09  Pascal Obry  <obry@adacore.com>

	* make.adb: Ensure that all linker arguments are duplicated.

From-SVN: r145838
parent 59f3dd0a
2009-04-09 Nicolas Setton <setton@adacore.com>
* s-osinte-darwin.ads: Fix wrong binding to struc timeval.
* s-osinte-darwin.adb (To_Timeval): Adapt to fixed implementation of
struct_timeval.
2009-04-09 Bob Duff <duff@adacore.com>
* exp_ch5.adb, exp_ch9.adb: Correct miscellaneous Slocs in
internally-generated nodes related to select statements to avoid
confusing the debugger.
2009-04-09 Pascal Obry <obry@adacore.com>
* make.adb: Ensure that all linker arguments are duplicated.
2009-04-09 Robert Dewar <dewar@adacore.com> 2009-04-09 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb: Minor reformatting * sem_ch5.adb: Minor reformatting
...@@ -3631,7 +3631,7 @@ package body Exp_Ch5 is ...@@ -3631,7 +3631,7 @@ package body Exp_Ch5 is
Call := Call :=
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To Name => New_Reference_To
(RTE (RE_Complete_Rendezvous), Loc)); (RTE (RE_Complete_Rendezvous), No_Location));
Insert_Before (N, Call); Insert_Before (N, Call);
-- why not insert actions here??? -- why not insert actions here???
Analyze (Call); Analyze (Call);
......
...@@ -740,7 +740,7 @@ package body Exp_Ch9 is ...@@ -740,7 +740,7 @@ package body Exp_Ch9 is
-- processing, has already been added for the expansion of requeue -- processing, has already been added for the expansion of requeue
-- statements. -- statements.
Call := Build_Runtime_Call (Loc, RE_Complete_Rendezvous); Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
Insert_Before (Last (Statements (Stats)), Call); Insert_Before (Last (Statements (Stats)), Call);
Analyze (Call); Analyze (Call);
...@@ -751,7 +751,7 @@ package body Exp_Ch9 is ...@@ -751,7 +751,7 @@ package body Exp_Ch9 is
Hand := First (Exception_Handlers (Stats)); Hand := First (Exception_Handlers (Stats));
while Present (Hand) loop while Present (Hand) loop
Call := Build_Runtime_Call (Loc, RE_Complete_Rendezvous); Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
Append (Call, Statements (Hand)); Append (Call, Statements (Hand));
Analyze (Call); Analyze (Call);
Next (Hand); Next (Hand);
...@@ -786,13 +786,13 @@ package body Exp_Ch9 is ...@@ -786,13 +786,13 @@ package body Exp_Ch9 is
Exception_Choices => New_List (Ohandle), Exception_Choices => New_List (Ohandle),
Statements => New_List ( Statements => New_List (
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (No_Location,
Name => New_Reference_To ( Name => New_Reference_To (
RTE (RE_Exceptional_Complete_Rendezvous), Loc), RTE (RE_Exceptional_Complete_Rendezvous), No_Location),
Parameter_Associations => New_List ( Parameter_Associations => New_List (
Make_Function_Call (Loc, Make_Function_Call (No_Location,
Name => New_Reference_To ( Name => New_Reference_To (
RTE (RE_Get_GNAT_Exception), Loc)))))))); RTE (RE_Get_GNAT_Exception), No_Location))))))));
Set_Parent (New_S, Astat); -- temp parent for Analyze call Set_Parent (New_S, Astat); -- temp parent for Analyze call
Analyze_Exception_Handlers (Exception_Handlers (New_S)); Analyze_Exception_Handlers (Exception_Handlers (New_S));
...@@ -4663,14 +4663,14 @@ package body Exp_Ch9 is ...@@ -4663,14 +4663,14 @@ package body Exp_Ch9 is
while Present (Formal) loop while Present (Formal) loop
Comp := Entry_Component (Formal); Comp := Entry_Component (Formal);
New_F := New_F :=
Make_Defining_Identifier (Sloc (Formal), Chars (Formal)); Make_Defining_Identifier (Loc, Chars (Formal));
Set_Etype (New_F, Etype (Formal)); Set_Etype (New_F, Etype (Formal));
Set_Scope (New_F, Ent); Set_Scope (New_F, Ent);
-- Now we set debug info needed on New_F even though it does -- Now we set debug info needed on New_F even though it does
-- not come from source, so that the debugger will get the -- not come from source, so that the debugger will get the
-- right information for these generated names. -- right information for these generated names.
Set_Debug_Info_Needed (New_F); Set_Debug_Info_Needed (New_F);
...@@ -8561,6 +8561,7 @@ package body Exp_Ch9 is ...@@ -8561,6 +8561,7 @@ package body Exp_Ch9 is
procedure Add_Accept (Alt : Node_Id) is procedure Add_Accept (Alt : Node_Id) is
Acc_Stm : constant Node_Id := Accept_Statement (Alt); Acc_Stm : constant Node_Id := Accept_Statement (Alt);
Ename : constant Node_Id := Entry_Direct_Name (Acc_Stm); Ename : constant Node_Id := Entry_Direct_Name (Acc_Stm);
Eloc : constant Source_Ptr := Sloc (Ename);
Eent : constant Entity_Id := Entity (Ename); Eent : constant Entity_Id := Entity (Ename);
Index : constant Node_Id := Entry_Index (Acc_Stm); Index : constant Node_Id := Entry_Index (Acc_Stm);
Null_Body : Node_Id; Null_Body : Node_Id;
...@@ -8576,29 +8577,29 @@ package body Exp_Ch9 is ...@@ -8576,29 +8577,29 @@ package body Exp_Ch9 is
if Present (Condition (Alt)) then if Present (Condition (Alt)) then
Expr := Expr :=
Make_Conditional_Expression (Loc, New_List ( Make_Conditional_Expression (Eloc, New_List (
Condition (Alt), Condition (Alt),
Entry_Index_Expression (Loc, Eent, Index, Scope (Eent)), Entry_Index_Expression (Eloc, Eent, Index, Scope (Eent)),
New_Reference_To (RTE (RE_Null_Task_Entry), Loc))); New_Reference_To (RTE (RE_Null_Task_Entry), Eloc)));
else else
Expr := Expr :=
Entry_Index_Expression Entry_Index_Expression
(Loc, Eent, Index, Scope (Eent)); (Eloc, Eent, Index, Scope (Eent));
end if; end if;
if Present (Handled_Statement_Sequence (Accept_Statement (Alt))) then if Present (Handled_Statement_Sequence (Accept_Statement (Alt))) then
Null_Body := New_Reference_To (Standard_False, Loc); Null_Body := New_Reference_To (Standard_False, Eloc);
if Abort_Allowed then if Abort_Allowed then
Call := Make_Procedure_Call_Statement (Loc, Call := Make_Procedure_Call_Statement (Eloc,
Name => New_Reference_To (RTE (RE_Abort_Undefer), Loc)); Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
Insert_Before (First (Statements (Handled_Statement_Sequence ( Insert_Before (First (Statements (Handled_Statement_Sequence (
Accept_Statement (Alt)))), Call); Accept_Statement (Alt)))), Call);
Analyze (Call); Analyze (Call);
end if; end if;
PB_Ent := PB_Ent :=
Make_Defining_Identifier (Sloc (Ename), Make_Defining_Identifier (Eloc,
New_External_Name (Chars (Ename), 'A', Num_Accept)); New_External_Name (Chars (Ename), 'A', Num_Accept));
if Comes_From_Source (Alt) then if Comes_From_Source (Alt) then
...@@ -8606,9 +8607,9 @@ package body Exp_Ch9 is ...@@ -8606,9 +8607,9 @@ package body Exp_Ch9 is
end if; end if;
Proc_Body := Proc_Body :=
Make_Subprogram_Body (Loc, Make_Subprogram_Body (Eloc,
Specification => Specification =>
Make_Procedure_Specification (Loc, Make_Procedure_Specification (Eloc,
Defining_Unit_Name => PB_Ent), Defining_Unit_Name => PB_Ent),
Declarations => Declarations (Acc_Stm), Declarations => Declarations (Acc_Stm),
Handled_Statement_Sequence => Handled_Statement_Sequence =>
...@@ -8624,7 +8625,7 @@ package body Exp_Ch9 is ...@@ -8624,7 +8625,7 @@ package body Exp_Ch9 is
Append (Proc_Body, Body_List); Append (Proc_Body, Body_List);
else else
Null_Body := New_Reference_To (Standard_True, Loc); Null_Body := New_Reference_To (Standard_True, Eloc);
-- if accept statement has declarations, insert above, given that -- if accept statement has declarations, insert above, given that
-- we are not creating a body for the accept. -- we are not creating a body for the accept.
...@@ -8635,7 +8636,7 @@ package body Exp_Ch9 is ...@@ -8635,7 +8636,7 @@ package body Exp_Ch9 is
end if; end if;
Append_To (Accept_List, Append_To (Accept_List,
Make_Aggregate (Loc, Expressions => New_List (Null_Body, Expr))); Make_Aggregate (Eloc, Expressions => New_List (Null_Body, Expr)));
Num_Accept := Num_Accept + 1; Num_Accept := Num_Accept + 1;
end Add_Accept; end Add_Accept;
...@@ -8705,9 +8706,9 @@ package body Exp_Ch9 is ...@@ -8705,9 +8706,9 @@ package body Exp_Ch9 is
Make_Integer_Literal (Loc, Index)); Make_Integer_Literal (Loc, Index));
Alt_Stats := New_List ( Alt_Stats := New_List (
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Sloc (Proc),
Name => New_Reference_To ( Name => New_Reference_To (
Defining_Unit_Name (Specification (Proc)), Loc))); Defining_Unit_Name (Specification (Proc)), Sloc (Proc))));
end if; end if;
if Statements (Alt) /= Empty_List then if Statements (Alt) /= Empty_List then
......
...@@ -6453,7 +6453,8 @@ package body Make is ...@@ -6453,7 +6453,8 @@ package body Make is
else else
Last_Arg := Last_Arg + 1; Last_Arg := Last_Arg + 1;
Args (Last_Arg) := Linker_Switches.Table (J); Args (Last_Arg) :=
new String'(Linker_Switches.Table (J).all);
end if; end if;
end loop; end loop;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1999-2006 Free Software Foundation, Inc. -- -- Copyright (C) 1999-2008, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -95,11 +95,11 @@ package body System.OS_Interface is ...@@ -95,11 +95,11 @@ package body System.OS_Interface is
---------------- ----------------
function To_Timeval (D : Duration) return struct_timeval is function To_Timeval (D : Duration) return struct_timeval is
S : int32_t; S : time_t;
F : Duration; F : Duration;
begin begin
S := int32_t (D); S := time_t (D);
F := D - Duration (S); F := D - Duration (S);
-- If F has negative value due to a round-up, adjust for positive F -- If F has negative value due to a round-up, adjust for positive F
......
...@@ -525,7 +525,7 @@ private ...@@ -525,7 +525,7 @@ private
CLOCK_REALTIME : constant clockid_t := 0; CLOCK_REALTIME : constant clockid_t := 0;
type struct_timeval is record type struct_timeval is record
tv_sec : int32_t; tv_sec : time_t;
tv_usec : int32_t; tv_usec : int32_t;
end record; end record;
pragma Convention (C, struct_timeval); pragma Convention (C, struct_timeval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment