OSDN Git Service

2011-12-05 Bob Duff <duff@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / exp_ch13.adb
index 9f18235..038a844 100644 (file)
@@ -39,6 +39,7 @@ with Restrict; use Restrict;
 with Rident;   use Rident;
 with Rtsfind;  use Rtsfind;
 with Sem;      use Sem;
+with Sem_Aux;  use Sem_Aux;
 with Sem_Ch7;  use Sem_Ch7;
 with Sem_Ch8;  use Sem_Ch8;
 with Sem_Eval; use Sem_Eval;
@@ -230,7 +231,7 @@ package body Exp_Ch13 is
          return;
       end if;
 
-      --  Use the base type to perform the collection check
+      --  Use the base type to perform the check for finalization master
 
       Typ := Etype (Expr);
 
@@ -248,10 +249,10 @@ package body Exp_Ch13 is
 
       --  Do not create a custom Deallocate when freeing an object with
       --  suppressed finalization. In such cases the object is never attached
-      --  to a collection, so it does not need to be detached. Use a regular
-      --  free statement instead.
+      --  to a master, so it does not need to be detached. Use a regular free
+      --  statement instead.
 
-      if No (Associated_Collection (Typ)) then
+      if No (Finalization_Master (Typ)) then
          return;
       end if;