aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 14:48:57 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 14:48:57 +0200
commitc3b36d484f5b232e882a0535bf275329dc91f3a4 (patch)
tree47bf67450e9d66673b482978f600394e794af7d2 /gcc
parent3405870d5aadb353ada9c15c886b1cc13d9fd339 (diff)
downloadgcc-c3b36d484f5b232e882a0535bf275329dc91f3a4.zip
gcc-c3b36d484f5b232e882a0535bf275329dc91f3a4.tar.gz
gcc-c3b36d484f5b232e882a0535bf275329dc91f3a4.tar.bz2
[multiple changes]
2009-04-15 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Expand_Ctrl_Function_Call): Check for the case where the immediate parent of the controlled function call is a component association. 2009-04-15 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Use_One_Type): If the type is tagged, indicate that the corresponding class-wide type is also in use. 2009-04-15 Thomas Quinot <quinot@adacore.com> * frontend.adb: Minor comment fix From-SVN: r146110
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/exp_ch7.adb7
-rw-r--r--gcc/ada/frontend.adb6
-rw-r--r--gcc/ada/sem_ch8.adb8
4 files changed, 31 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6872b65..ff19f3a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,18 @@
+2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch7.adb (Expand_Ctrl_Function_Call): Check for the case where the
+ immediate parent of the controlled function call is a component
+ association.
+
+2009-04-15 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Use_One_Type): If the type is tagged, indicate that the
+ corresponding class-wide type is also in use.
+
+2009-04-15 Thomas Quinot <quinot@adacore.com>
+
+ * frontend.adb: Minor comment fix
+
2009-04-15 Robert Dewar <dewar@adacore.com>
* gnatchop.adb (BOM_Length): New global variable
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 23170bc..b46d577 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -1409,8 +1409,11 @@ package body Exp_Ch7 is
-- expansion is complete. See body of Exp_Aggr for the treatment of
-- other controlled components.
- if Nkind (Parent (N)) = N_Aggregate
- and then Is_Array_Type (Etype (Parent (N)))
+ if (Nkind (Parent (N)) = N_Aggregate
+ and then Is_Array_Type (Etype (Parent (N))))
+ or else
+ (Nkind (Parent (N)) = N_Component_Association
+ and then Is_Array_Type (Etype (Parent (Parent (N)))))
then
return;
end if;
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 5fd2822..ac3b2c8 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -70,7 +70,7 @@ begin
-- logically be performed at elaboration time, were it not for the fact
-- that we may be doing things more than once in the big loop over files.
-- Like elaboration, the order in which these calls are made is in some
- -- cases important. For example, Lib cannot be initialized until Namet,
+ -- cases important. For example, Lib cannot be initialized before Namet,
-- since it uses names table entries.
Rtsfind.Initialize;
@@ -277,8 +277,8 @@ begin
end;
end if;
- -- If we have restriction No_Exception_Propagation, and we did not have
- -- an explicit switch turning off Warn_On_Local_Exception, then turn on
+ -- If we have restriction No_Exception_Propagation, and we did not have an
+ -- explicit switch turning off Warn_On_Non_Local_Exception, then turn on
-- this warning by default if we have encountered an exception handler.
if Restriction_Active (No_Exception_Propagation)
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d075a23..4c97e09 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7143,6 +7143,14 @@ package body Sem_Ch8 is
elsif not Redundant_Use (Id) then
Set_In_Use (T);
+
+ -- If T is tagged, primitive operators on class-wide operands
+ -- are also available.
+
+ if Is_Tagged_Type (T) then
+ Set_In_Use (Class_Wide_Type (T));
+ end if;
+
Set_Current_Use_Clause (T, Parent (Id));
Op_List := Collect_Primitive_Operations (T);