Commit 99f97947 by Arnaud Charlet

[multiple changes]

2013-10-15  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
	Minor reformatting.

2013-10-15  Eric Botcazou  <ebotcazou@adacore.com>

	* targparm.ads: Fix minor typo in comment.

2013-10-15  Ed Schonberg  <schonberg@adacore.com>

	* lib-xref.adb: handle full views that are derived from private
	types.
	* sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
	mode: the elaboration entity is not in the source, and plays no
	role in semantic analysis.  Minor reformatting.

From-SVN: r203594
parent b9ec8463
2013-10-15 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
Minor reformatting.
2013-10-15 Eric Botcazou <ebotcazou@adacore.com>
* targparm.ads: Fix minor typo in comment.
2013-10-15 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb: handle full views that are derived from private
types.
* sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
mode: the elaboration entity is not in the source, and plays no
role in semantic analysis. Minor reformatting.
2013-10-15 Tristan Gingold <gingold@adacore.com> 2013-10-15 Tristan Gingold <gingold@adacore.com>
* adaint.c (__gnat_get_executable_load_address): Remove AIX * adaint.c (__gnat_get_executable_load_address): Remove AIX
......
...@@ -865,8 +865,9 @@ package body Ada.Exceptions is ...@@ -865,8 +865,9 @@ package body Ada.Exceptions is
-- Get_Exception_Machine_Occurrence -- -- Get_Exception_Machine_Occurrence --
-------------------------------------- --------------------------------------
function Get_Exception_Machine_Occurrence (X : Exception_Occurrence) function Get_Exception_Machine_Occurrence
return System.Address is (X : Exception_Occurrence) return System.Address
is
begin begin
return X.Machine_Occurrence; return X.Machine_Occurrence;
end Get_Exception_Machine_Occurrence; end Get_Exception_Machine_Occurrence;
......
...@@ -333,8 +333,8 @@ private ...@@ -333,8 +333,8 @@ private
-- this, and it would not work right, because of the Msg and Tracebacks -- this, and it would not work right, because of the Msg and Tracebacks
-- fields which have unused entries not copied by Save_Occurrence. -- fields which have unused entries not copied by Save_Occurrence.
function Get_Exception_Machine_Occurrence (X : Exception_Occurrence) function Get_Exception_Machine_Occurrence
return System.Address; (X : Exception_Occurrence) return System.Address;
pragma Export (Ada, Get_Exception_Machine_Occurrence, pragma Export (Ada, Get_Exception_Machine_Occurrence,
"__gnat_get_exception_machine_occurrence"); "__gnat_get_exception_machine_occurrence");
-- Get the machine occurrence corresponding to an exception occurrence. -- Get the machine occurrence corresponding to an exception occurrence.
......
...@@ -1039,9 +1039,8 @@ package body Exp_Ch11 is ...@@ -1039,9 +1039,8 @@ package body Exp_Ch11 is
Save : Node_Id; Save : Node_Id;
begin begin
-- Note use of No_Location to hide this code from the -- Note: No_Location used to hide code from the debugger,
-- debugger, so single stepping doesn't jump back and -- so single stepping doesn't jump back and forth.
-- forth.
Save := Save :=
Make_Procedure_Call_Statement (No_Location, Make_Procedure_Call_Statement (No_Location,
...@@ -1051,9 +1050,11 @@ package body Exp_Ch11 is ...@@ -1051,9 +1050,11 @@ package body Exp_Ch11 is
Parameter_Associations => New_List ( Parameter_Associations => New_List (
New_Occurrence_Of (Cparm, No_Location), New_Occurrence_Of (Cparm, No_Location),
Make_Explicit_Dereference (No_Location, Make_Explicit_Dereference (No_Location,
Prefix =>
Make_Function_Call (No_Location, Make_Function_Call (No_Location,
Name => Name =>
Make_Explicit_Dereference (No_Location, Make_Explicit_Dereference (No_Location,
Prefix =>
New_Occurrence_Of New_Occurrence_Of
(RTE (RE_Get_Current_Excep), (RTE (RE_Get_Current_Excep),
No_Location)))))); No_Location))))));
......
...@@ -1307,9 +1307,23 @@ package body Lib.Xref is ...@@ -1307,9 +1307,23 @@ package body Lib.Xref is
Right := '>'; Right := '>';
end if; end if;
-- If non-derived ptr, get directly designated type. -- If the completion of a private type is itself a derived
-- type, we need the parent of the full view.
elsif Is_Private_Type (Tref)
and then Present (Full_View (Tref))
and then Etype (Full_View (Tref)) /= Full_View (Tref)
then
Tref := Etype (Full_View (Tref));
if Left /= '(' then
Left := '<';
Right := '>';
end if;
-- If non-derived pointer, get directly designated type.
-- If the type has a full view, all references are on the -- If the type has a full view, all references are on the
-- partial view, that is seen first. -- partial view that is seen first.
elsif Is_Access_Type (Tref) then elsif Is_Access_Type (Tref) then
Tref := Directly_Designated_Type (Tref); Tref := Directly_Designated_Type (Tref);
......
...@@ -2366,8 +2366,7 @@ package body Sem_Prag is ...@@ -2366,8 +2366,7 @@ package body Sem_Prag is
elsif Contains (Inputs_Seen, Input_Id) then elsif Contains (Inputs_Seen, Input_Id) then
Error_Msg_N ("duplicate input item", Input); Error_Msg_N ("duplicate input item", Input);
-- The input is legal, add it to the list of processed -- Input is legal, add it to the list of processed inputs
-- inputs.
else else
Add_Item (Input_Id, Inputs_Seen); Add_Item (Input_Id, Inputs_Seen);
...@@ -2408,7 +2407,6 @@ package body Sem_Prag is ...@@ -2408,7 +2407,6 @@ package body Sem_Prag is
while Present (Elmt) loop while Present (Elmt) loop
if Name_Seen then if Name_Seen then
Error_Msg_N ("only one item allowed in initialization", Elmt); Error_Msg_N ("only one item allowed in initialization", Elmt);
else else
Name_Seen := True; Name_Seen := True;
Analyze_Initialization_Item (Elmt); Analyze_Initialization_Item (Elmt);
...@@ -2424,7 +2422,6 @@ package body Sem_Prag is ...@@ -2424,7 +2422,6 @@ package body Sem_Prag is
Input := First (Expressions (Inputs)); Input := First (Expressions (Inputs));
while Present (Input) loop while Present (Input) loop
Analyze_Input_Item (Input); Analyze_Input_Item (Input);
Next (Input); Next (Input);
end loop; end loop;
end if; end if;
......
...@@ -423,7 +423,7 @@ package body Sem_Util is ...@@ -423,7 +423,7 @@ package body Sem_Util is
Decl := First Decl := First
(Visible_Declarations (Visible_Declarations
(Specification (Unit_Declaration_Node (Current_Scope)))); (Package_Specification (Current_Scope)));
while Present (Decl) loop while Present (Decl) loop
if Nkind (Decl) = N_Private_Extension_Declaration if Nkind (Decl) = N_Private_Extension_Declaration
and then Defining_Entity (Decl) = Typ and then Defining_Entity (Decl) = Typ
...@@ -1169,6 +1169,13 @@ package body Sem_Util is ...@@ -1169,6 +1169,13 @@ package body Sem_Util is
return; return;
end if; end if;
-- Ignore in ASIS mode, elaboration entity is not in source and plays
-- no role in analysis.
if ASIS_Mode then
return;
end if;
-- Construct name of elaboration entity as xxx_E, where xxx is the unit -- Construct name of elaboration entity as xxx_E, where xxx is the unit
-- name with dots replaced by double underscore. We have to manually -- name with dots replaced by double underscore. We have to manually
-- construct this name, since it will be elaborated in the outer scope, -- construct this name, since it will be elaborated in the outer scope,
......
...@@ -402,7 +402,7 @@ package Targparm is ...@@ -402,7 +402,7 @@ package Targparm is
-- appropriate default in some cases, e.g. on embedded targets which do not -- appropriate default in some cases, e.g. on embedded targets which do not
-- allow the possibility of multi-processors. The default can be overridden -- allow the possibility of multi-processors. The default can be overridden
-- using pragmas Enable/Disable_Atomic_Synchronization and also by use of -- using pragmas Enable/Disable_Atomic_Synchronization and also by use of
-- the debug flags gnat.d and gnatd.e. -- the corresponding debug flags -gnatd.e and -gnatd.d.
Support_Aggregates_On_Target : Boolean := True; Support_Aggregates_On_Target : Boolean := True;
-- In the general case, the use of aggregates may generate calls -- In the general case, the use of aggregates may generate calls
......
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