Skip to content

Commit dd8cfe3

Browse files
author
Arnaud Charlet
committed
[multiple changes]
2009-04-09 Nicolas Setton <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * make.adb: Ensure that all linker arguments are duplicated. From-SVN: r145838
1 parent 59f3dd0 commit dd8cfe3

File tree

6 files changed

+49
-30
lines changed

6 files changed

+49
-30
lines changed

gcc/ada/ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2009-04-09 Nicolas Setton <[email protected]>
2+
3+
* s-osinte-darwin.ads: Fix wrong binding to struc timeval.
4+
5+
* s-osinte-darwin.adb (To_Timeval): Adapt to fixed implementation of
6+
struct_timeval.
7+
8+
2009-04-09 Bob Duff <[email protected]>
9+
10+
* exp_ch5.adb, exp_ch9.adb: Correct miscellaneous Slocs in
11+
internally-generated nodes related to select statements to avoid
12+
confusing the debugger.
13+
14+
2009-04-09 Pascal Obry <[email protected]>
15+
16+
* make.adb: Ensure that all linker arguments are duplicated.
17+
118
2009-04-09 Robert Dewar <[email protected]>
219

320
* sem_ch5.adb: Minor reformatting

gcc/ada/exp_ch5.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3631,7 +3631,7 @@ package body Exp_Ch5 is
36313631
Call :=
36323632
Make_Procedure_Call_Statement (Loc,
36333633
Name => New_Reference_To
3634-
(RTE (RE_Complete_Rendezvous), Loc));
3634+
(RTE (RE_Complete_Rendezvous), No_Location));
36353635
Insert_Before (N, Call);
36363636
-- why not insert actions here???
36373637
Analyze (Call);

gcc/ada/exp_ch9.adb

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ package body Exp_Ch9 is
740740
-- processing, has already been added for the expansion of requeue
741741
-- statements.
742742

743-
Call := Build_Runtime_Call (Loc, RE_Complete_Rendezvous);
743+
Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
744744
Insert_Before (Last (Statements (Stats)), Call);
745745
Analyze (Call);
746746

@@ -751,7 +751,7 @@ package body Exp_Ch9 is
751751
Hand := First (Exception_Handlers (Stats));
752752

753753
while Present (Hand) loop
754-
Call := Build_Runtime_Call (Loc, RE_Complete_Rendezvous);
754+
Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
755755
Append (Call, Statements (Hand));
756756
Analyze (Call);
757757
Next (Hand);
@@ -786,13 +786,13 @@ package body Exp_Ch9 is
786786
Exception_Choices => New_List (Ohandle),
787787

788788
Statements => New_List (
789-
Make_Procedure_Call_Statement (Loc,
789+
Make_Procedure_Call_Statement (No_Location,
790790
Name => New_Reference_To (
791-
RTE (RE_Exceptional_Complete_Rendezvous), Loc),
791+
RTE (RE_Exceptional_Complete_Rendezvous), No_Location),
792792
Parameter_Associations => New_List (
793-
Make_Function_Call (Loc,
793+
Make_Function_Call (No_Location,
794794
Name => New_Reference_To (
795-
RTE (RE_Get_GNAT_Exception), Loc))))))));
795+
RTE (RE_Get_GNAT_Exception), No_Location))))))));
796796

797797
Set_Parent (New_S, Astat); -- temp parent for Analyze call
798798
Analyze_Exception_Handlers (Exception_Handlers (New_S));
@@ -4663,14 +4663,14 @@ package body Exp_Ch9 is
46634663
while Present (Formal) loop
46644664
Comp := Entry_Component (Formal);
46654665
New_F :=
4666-
Make_Defining_Identifier (Sloc (Formal), Chars (Formal));
4666+
Make_Defining_Identifier (Loc, Chars (Formal));
46674667

46684668
Set_Etype (New_F, Etype (Formal));
46694669
Set_Scope (New_F, Ent);
46704670

4671-
-- Now we set debug info needed on New_F even though it does
4672-
-- not come from source, so that the debugger will get the
4673-
-- right information for these generated names.
4671+
-- Now we set debug info needed on New_F even though it does
4672+
-- not come from source, so that the debugger will get the
4673+
-- right information for these generated names.
46744674

46754675
Set_Debug_Info_Needed (New_F);
46764676

@@ -8561,6 +8561,7 @@ package body Exp_Ch9 is
85618561
procedure Add_Accept (Alt : Node_Id) is
85628562
Acc_Stm : constant Node_Id := Accept_Statement (Alt);
85638563
Ename : constant Node_Id := Entry_Direct_Name (Acc_Stm);
8564+
Eloc : constant Source_Ptr := Sloc (Ename);
85648565
Eent : constant Entity_Id := Entity (Ename);
85658566
Index : constant Node_Id := Entry_Index (Acc_Stm);
85668567
Null_Body : Node_Id;
@@ -8576,39 +8577,39 @@ package body Exp_Ch9 is
85768577

85778578
if Present (Condition (Alt)) then
85788579
Expr :=
8579-
Make_Conditional_Expression (Loc, New_List (
8580+
Make_Conditional_Expression (Eloc, New_List (
85808581
Condition (Alt),
8581-
Entry_Index_Expression (Loc, Eent, Index, Scope (Eent)),
8582-
New_Reference_To (RTE (RE_Null_Task_Entry), Loc)));
8582+
Entry_Index_Expression (Eloc, Eent, Index, Scope (Eent)),
8583+
New_Reference_To (RTE (RE_Null_Task_Entry), Eloc)));
85838584
else
85848585
Expr :=
85858586
Entry_Index_Expression
8586-
(Loc, Eent, Index, Scope (Eent));
8587+
(Eloc, Eent, Index, Scope (Eent));
85878588
end if;
85888589

85898590
if Present (Handled_Statement_Sequence (Accept_Statement (Alt))) then
8590-
Null_Body := New_Reference_To (Standard_False, Loc);
8591+
Null_Body := New_Reference_To (Standard_False, Eloc);
85918592

85928593
if Abort_Allowed then
8593-
Call := Make_Procedure_Call_Statement (Loc,
8594-
Name => New_Reference_To (RTE (RE_Abort_Undefer), Loc));
8594+
Call := Make_Procedure_Call_Statement (Eloc,
8595+
Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
85958596
Insert_Before (First (Statements (Handled_Statement_Sequence (
85968597
Accept_Statement (Alt)))), Call);
85978598
Analyze (Call);
85988599
end if;
85998600

86008601
PB_Ent :=
8601-
Make_Defining_Identifier (Sloc (Ename),
8602+
Make_Defining_Identifier (Eloc,
86028603
New_External_Name (Chars (Ename), 'A', Num_Accept));
86038604

86048605
if Comes_From_Source (Alt) then
86058606
Set_Debug_Info_Needed (PB_Ent);
86068607
end if;
86078608

86088609
Proc_Body :=
8609-
Make_Subprogram_Body (Loc,
8610+
Make_Subprogram_Body (Eloc,
86108611
Specification =>
8611-
Make_Procedure_Specification (Loc,
8612+
Make_Procedure_Specification (Eloc,
86128613
Defining_Unit_Name => PB_Ent),
86138614
Declarations => Declarations (Acc_Stm),
86148615
Handled_Statement_Sequence =>
@@ -8624,7 +8625,7 @@ package body Exp_Ch9 is
86248625
Append (Proc_Body, Body_List);
86258626

86268627
else
8627-
Null_Body := New_Reference_To (Standard_True, Loc);
8628+
Null_Body := New_Reference_To (Standard_True, Eloc);
86288629

86298630
-- if accept statement has declarations, insert above, given that
86308631
-- we are not creating a body for the accept.
@@ -8635,7 +8636,7 @@ package body Exp_Ch9 is
86358636
end if;
86368637

86378638
Append_To (Accept_List,
8638-
Make_Aggregate (Loc, Expressions => New_List (Null_Body, Expr)));
8639+
Make_Aggregate (Eloc, Expressions => New_List (Null_Body, Expr)));
86398640

86408641
Num_Accept := Num_Accept + 1;
86418642
end Add_Accept;
@@ -8705,9 +8706,9 @@ package body Exp_Ch9 is
87058706
Make_Integer_Literal (Loc, Index));
87068707

87078708
Alt_Stats := New_List (
8708-
Make_Procedure_Call_Statement (Loc,
8709+
Make_Procedure_Call_Statement (Sloc (Proc),
87098710
Name => New_Reference_To (
8710-
Defining_Unit_Name (Specification (Proc)), Loc)));
8711+
Defining_Unit_Name (Specification (Proc)), Sloc (Proc))));
87118712
end if;
87128713

87138714
if Statements (Alt) /= Empty_List then

gcc/ada/make.adb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6453,7 +6453,8 @@ package body Make is
64536453

64546454
else
64556455
Last_Arg := Last_Arg + 1;
6456-
Args (Last_Arg) := Linker_Switches.Table (J);
6456+
Args (Last_Arg) :=
6457+
new String'(Linker_Switches.Table (J).all);
64576458
end if;
64586459
end loop;
64596460

gcc/ada/s-osinte-darwin.adb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-- --
77
-- B o d y --
88
-- --
9-
-- Copyright (C) 1999-2006 Free Software Foundation, Inc. --
9+
-- Copyright (C) 1999-2008, Free Software Foundation, Inc. --
1010
-- --
1111
-- GNARL is free software; you can redistribute it and/or modify it under --
1212
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -95,11 +95,11 @@ package body System.OS_Interface is
9595
----------------
9696

9797
function To_Timeval (D : Duration) return struct_timeval is
98-
S : int32_t;
98+
S : time_t;
9999
F : Duration;
100100

101101
begin
102-
S := int32_t (D);
102+
S := time_t (D);
103103
F := D - Duration (S);
104104

105105
-- If F has negative value due to a round-up, adjust for positive F

gcc/ada/s-osinte-darwin.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ private
525525
CLOCK_REALTIME : constant clockid_t := 0;
526526

527527
type struct_timeval is record
528-
tv_sec : int32_t;
528+
tv_sec : time_t;
529529
tv_usec : int32_t;
530530
end record;
531531
pragma Convention (C, struct_timeval);

0 commit comments

Comments
 (0)