aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-04-25 17:12:34 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-04-25 17:12:34 +0200
commitd024b1268cedd1e5720d9f6968bef11d8a159c15 (patch)
treef6ae78dc92a93c3dcc28c325109924304a992559 /gcc
parent838ff415aed1282e62247bac07e80955d8c85aeb (diff)
downloadgcc-d024b1268cedd1e5720d9f6968bef11d8a159c15.zip
gcc-d024b1268cedd1e5720d9f6968bef11d8a159c15.tar.gz
gcc-d024b1268cedd1e5720d9f6968bef11d8a159c15.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/lib-xref.adb10
-rw-r--r--gcc/ada/sem_ch12.adb12
-rw-r--r--gcc/ada/sem_ch3.adb29
4 files changed, 45 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3414491..44f206c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index b6595b3..fb46a36 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -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;
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index d052563..a5360d4 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -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;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 3e10ac3..f80804d 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -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)));
- 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));
+ (Derived_Type, OK_To_Reorder_Components (Parent_Full));
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