[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 15 Apr 2009 12:48:57 +0000 (14:48 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 15 Apr 2009 12:48:57 +0000 (14:48 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb
gcc/ada/frontend.adb
gcc/ada/sem_ch8.adb

index 6872b65..ff19f3a 100644 (file)
@@ -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
index 23170bc..b46d577 100644 (file)
@@ -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;
index 5fd2822..ac3b2c8 100644 (file)
@@ -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)
index d075a23..4c97e09 100644 (file)
@@ -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);