]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
exp_ch4.adb (Expand_N_Allocator): Update the master of an anonymous access-to-control...
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 12 Dec 2011 13:40:18 +0000 (13:40 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 12 Dec 2011 13:40:18 +0000 (14:40 +0100)
2011-12-12  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch4.adb (Expand_N_Allocator): Update the master of an
anonymous access-to-controlled type to utilize the heterogeneous
master associated with the current unit.

From-SVN: r182239

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb

index 8ccc29bbbe705f3a43eb1c0a5c7f8beb1aa4d744..a3679ddbbdc773501af107cc7bdfe2f36c7eca3b 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-12  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * exp_ch4.adb (Expand_N_Allocator): Update the master of an
+       anonymous access-to-controlled type to utilize the heterogeneous
+       master associated with the current unit.
+
 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch6.adb (Analyze_Expression_Function): If the function
index 12980a74ad4a855b9b95afef6d14e75459bba856..f45ea08bdf952a4b005cc3f98fd299a9e92b8016 100644 (file)
@@ -3510,11 +3510,10 @@ package body Exp_Ch4 is
 
          --  The finalization master must be inserted and analyzed as part of
          --  the current semantic unit. This form of expansion is not carried
-         --  out in Alfa mode because it is useless.
+         --  out in Alfa mode because it is useless. Note that the master is
+         --  updated when analysis changes current units.
 
-         if No (Finalization_Master (PtrT))
-           and then not Alfa_Mode
-         then
+         if not Alfa_Mode then
             Set_Finalization_Master (PtrT, Current_Anonymous_Master);
          end if;
       end if;