aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 11:46:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 11:46:31 +0200
commita780db15307e718218f39f753eebe20689fa1e30 (patch)
tree4540c03ab0e98dee1c3ccd724dbec7f679f61108 /gcc
parentfda9c731a9a047cdde798207b896784e8233a4d8 (diff)
downloadgcc-a780db15307e718218f39f753eebe20689fa1e30.zip
gcc-a780db15307e718218f39f753eebe20689fa1e30.tar.gz
gcc-a780db15307e718218f39f753eebe20689fa1e30.tar.bz2
[multiple changes]
2010-10-18 Javier Miranda <miranda@adacore.com> * exp_util.adb (Side_Effect_Free): Code clean up. 2010-10-18 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Is_Primitive_Operator_In_Use): Renamed from Is_Primitive_Operator. When ending the scope of a use package scope, a primitive operator remains in use if the base type has a current use (type) clause. 2010-10-18 Javier Miranda <miranda@adacore.com> * einfo.ads (Is_Dynamic_Support): Add missing support for limited private types whose full-view is a task type. * sem_util.adb (Enclosing_Subprogram): Add missing support for limited private types whose full-view is a task type. * exp_ch7.adb (Find_Final_List): Minor code cleanup replacing code by function Nearest_Dynamic_Scope which provides the needed functionality. 2010-10-18 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Set_Exported): Do not generate error when exporting a variable with an address clause in codepeer mode. From-SVN: r165614
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog25
-rw-r--r--gcc/ada/einfo.adb4
-rw-r--r--gcc/ada/exp_ch7.adb6
-rw-r--r--gcc/ada/exp_util.adb2
-rw-r--r--gcc/ada/sem_ch8.adb20
-rw-r--r--gcc/ada/sem_prag.adb2
-rw-r--r--gcc/ada/sem_util.adb6
7 files changed, 49 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 256483c..251ac57 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,28 @@
+2010-10-18 Javier Miranda <miranda@adacore.com>
+
+ * exp_util.adb (Side_Effect_Free): Code clean up.
+
+2010-10-18 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Is_Primitive_Operator_In_Use): Renamed from
+ Is_Primitive_Operator. When ending the scope of a use package scope, a
+ primitive operator remains in use if the base type has a current use
+ (type) clause.
+
+2010-10-18 Javier Miranda <miranda@adacore.com>
+
+ * einfo.ads (Is_Dynamic_Support): Add missing support for limited
+ private types whose full-view is a task type.
+ * sem_util.adb (Enclosing_Subprogram): Add missing support for limited
+ private types whose full-view is a task type.
+ * exp_ch7.adb (Find_Final_List): Minor code cleanup replacing code by
+ function Nearest_Dynamic_Scope which provides the needed functionality.
+
+2010-10-18 Arnaud Charlet <charlet@adacore.com>
+
+ * sem_prag.adb (Set_Exported): Do not generate error when exporting a
+ variable with an address clause in codepeer mode.
+
2010-10-18 Robert Dewar <dewar@adacore.com>
* g-trasym-vms-ia64.adb: Minor reformatting.
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 3c0314b..6782c5b 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -6130,6 +6130,10 @@ package body Einfo is
or else
Ekind (Id) = E_Task_Type
or else
+ (Ekind (Id) = E_Limited_Private_Type
+ and then Present (Full_View (Id))
+ and then Ekind (Full_View (Id)) = E_Task_Type)
+ or else
Ekind (Id) = E_Entry
or else
Ekind (Id) = E_Entry_Family
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 2b7d901..27f4b50 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -1739,11 +1739,7 @@ package body Exp_Ch7 is
end if;
else
- if Is_Dynamic_Scope (E) then
- S := E;
- else
- S := Enclosing_Dynamic_Scope (E);
- end if;
+ S := Nearest_Dynamic_Scope (E);
-- When the finalization chain entity is 'Error', it means that there
-- should not be any chain at that level and that the enclosing one
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 6624802..77ad7a0 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -4655,8 +4655,8 @@ package body Exp_Util is
elsif VM_Target /= No_VM
and then not Comes_From_Source (N)
- and then Is_Class_Wide_Type (Etype (N))
and then Nkind (Parent (N)) = N_Object_Renaming_Declaration
+ and then Is_Class_Wide_Type (Etype (N))
then
return True;
end if;
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 8404e95..d45ebda 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -3361,24 +3361,25 @@ package body Sem_Ch8 is
Id : Entity_Id;
Elmt : Elmt_Id;
- function Is_Primitive_Operator
+ function Is_Primitive_Operator_In_Use
(Op : Entity_Id;
F : Entity_Id) return Boolean;
-- Check whether Op is a primitive operator of a use-visible type
- ---------------------------
- -- Is_Primitive_Operator --
- ---------------------------
+ ----------------------------------
+ -- Is_Primitive_Operator_In_Use --
+ ----------------------------------
- function Is_Primitive_Operator
+ function Is_Primitive_Operator_In_Use
(Op : Entity_Id;
F : Entity_Id) return Boolean
is
T : constant Entity_Id := Etype (F);
begin
- return In_Use (T)
+ return (In_Use (T)
+ or else Present (Current_Use_Clause (Base_Type (T))))
and then Scope (T) = Scope (Op);
- end Is_Primitive_Operator;
+ end Is_Primitive_Operator_In_Use;
-- Start of processing for End_Use_Package
@@ -3409,11 +3410,12 @@ package body Sem_Ch8 is
if Nkind (Id) = N_Defining_Operator_Symbol
and then
- (Is_Primitive_Operator (Id, First_Formal (Id))
+ (Is_Primitive_Operator_In_Use
+ (Id, First_Formal (Id))
or else
(Present (Next_Formal (First_Formal (Id)))
and then
- Is_Primitive_Operator
+ Is_Primitive_Operator_In_Use
(Id, Next_Formal (First_Formal (Id)))))
then
null;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 516ebc9..443aa92 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -4986,7 +4986,7 @@ package body Sem_Prag is
Error_Pragma_Arg
("cannot export entity& that was previously imported", Arg);
- elsif Present (Address_Clause (E)) then
+ elsif Present (Address_Clause (E)) and then not CodePeer_Mode then
Error_Pragma_Arg
("cannot export entity& that has an address clause", Arg);
end if;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index ff7c4d7..461f509 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -2715,6 +2715,12 @@ package body Sem_Util is
elsif Ekind (Dynamic_Scope) = E_Task_Type then
return Get_Task_Body_Procedure (Dynamic_Scope);
+ elsif Ekind (Dynamic_Scope) = E_Limited_Private_Type
+ and then Present (Full_View (Dynamic_Scope))
+ and then Ekind (Full_View (Dynamic_Scope)) = E_Task_Type
+ then
+ return Get_Task_Body_Procedure (Full_View (Dynamic_Scope));
+
-- No body is generated if the protected operation is eliminated
elsif Convention (Dynamic_Scope) = Convention_Protected