[multiple changes]
2012-04-25 Vincent Celier <celier@adacore.com> * sem_ch12.adb (Inherit_Context): Compare library units, not names of units, when checking if a unit is already in the context. 2012-04-25 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb: Reverse_Storage_Order must be propagated to untagged derived record types. 2012-04-25 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb: Adjust position of end label. From-SVN: r186827
This commit is contained in:
parent
838ff415ae
commit
d024b1268c
4 changed files with 45 additions and 20 deletions
|
@ -1,3 +1,17 @@
|
|||
2012-04-25 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* sem_ch12.adb (Inherit_Context): Compare library units, not
|
||||
names of units, when checking if a unit is already in the context.
|
||||
|
||||
2012-04-25 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* sem_ch3.adb: Reverse_Storage_Order must be propagated to
|
||||
untagged derived record types.
|
||||
|
||||
2012-04-25 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* lib-xref.adb: Adjust position of end label.
|
||||
|
||||
2012-04-22 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* gcc-interface/utils.c (gnat_write_global_declarations): Do not mark
|
||||
|
|
|
@ -1031,10 +1031,14 @@ package body Lib.Xref is
|
|||
Ref := Original_Location (Sloc (Nod));
|
||||
Def := Original_Location (Sloc (Ent));
|
||||
|
||||
-- If this is an operator symbol, skip the initial
|
||||
-- quote, for navigation purposes.
|
||||
-- If this is an operator symbol, skip the initial quote for
|
||||
-- navigation purposes. This is not done for the end label,
|
||||
-- where we want the actual position after the closing quote.
|
||||
|
||||
if Nkind (N) = N_Defining_Operator_Symbol
|
||||
if Typ = 't' then
|
||||
null;
|
||||
|
||||
elsif Nkind (N) = N_Defining_Operator_Symbol
|
||||
or else Nkind (Nod) = N_Operator_Symbol
|
||||
then
|
||||
Ref := Ref + 1;
|
||||
|
|
|
@ -7761,8 +7761,9 @@ package body Sem_Ch12 is
|
|||
Item : Node_Id;
|
||||
New_I : Node_Id;
|
||||
|
||||
Clause : Node_Id;
|
||||
OK : Boolean;
|
||||
Clause : Node_Id;
|
||||
OK : Boolean;
|
||||
Lib_Unit : Node_Id;
|
||||
|
||||
begin
|
||||
if Nkind (Parent (Gen_Decl)) = N_Compilation_Unit then
|
||||
|
@ -7784,17 +7785,18 @@ package body Sem_Ch12 is
|
|||
Item := First (Context_Items (Parent (Gen_Decl)));
|
||||
while Present (Item) loop
|
||||
if Nkind (Item) = N_With_Clause then
|
||||
Lib_Unit := Library_Unit (Item);
|
||||
|
||||
-- Take care to prevent direct cyclic with's.
|
||||
-- Take care to prevent direct cyclic with's
|
||||
|
||||
if Library_Unit (Item) /= Current_Unit then
|
||||
if Lib_Unit /= Current_Unit then
|
||||
-- Do not add a unit if it is already in the context
|
||||
|
||||
Clause := First (Current_Context);
|
||||
OK := True;
|
||||
while Present (Clause) loop
|
||||
if Nkind (Clause) = N_With_Clause and then
|
||||
Chars (Name (Clause)) = Chars (Name (Item))
|
||||
Library_Unit (Clause) = Lib_Unit
|
||||
then
|
||||
OK := False;
|
||||
exit;
|
||||
|
|
|
@ -7753,21 +7753,26 @@ package body Sem_Ch3 is
|
|||
|
||||
if Is_Record_Type (Derived_Type) then
|
||||
|
||||
-- Ekind (Parent_Base) is not necessarily E_Record_Type since
|
||||
-- Parent_Base can be a private type or private extension.
|
||||
declare
|
||||
Parent_Full : Entity_Id;
|
||||
begin
|
||||
-- Ekind (Parent_Base) is not necessarily E_Record_Type since
|
||||
-- Parent_Base can be a private type or private extension. Go
|
||||
-- to the full view here to get the E_Record_Type specific flags.
|
||||
|
||||
if Present (Full_View (Parent_Base)) then
|
||||
Parent_Full := Full_View (Parent_Base);
|
||||
else
|
||||
Parent_Full := Parent_Base;
|
||||
end if;
|
||||
|
||||
if Present (Full_View (Parent_Base)) then
|
||||
Set_OK_To_Reorder_Components
|
||||
(Derived_Type,
|
||||
OK_To_Reorder_Components (Full_View (Parent_Base)));
|
||||
(Derived_Type, OK_To_Reorder_Components (Parent_Full));
|
||||
Set_Reverse_Bit_Order
|
||||
(Derived_Type, Reverse_Bit_Order (Full_View (Parent_Base)));
|
||||
else
|
||||
Set_OK_To_Reorder_Components
|
||||
(Derived_Type, OK_To_Reorder_Components (Parent_Base));
|
||||
Set_Reverse_Bit_Order
|
||||
(Derived_Type, Reverse_Bit_Order (Parent_Base));
|
||||
end if;
|
||||
(Derived_Type, Reverse_Bit_Order (Parent_Full));
|
||||
Set_Reverse_Storage_Order
|
||||
(Derived_Type, Reverse_Storage_Order (Parent_Full));
|
||||
end;
|
||||
end if;
|
||||
|
||||
-- Direct controlled types do not inherit Finalize_Storage_Only flag
|
||||
|
|
Loading…
Add table
Reference in a new issue