Your message dated Sat, 31 Jul 2010 23:03:29 +0000
with message-id <e1ofl5v-00071c...@franck.debian.org>
and subject line Bug#589164: fixed in gnat-4.4 4.4.4-5
has caused the Debian Bug report #589164,
regarding gnat-4.4: [Fixed in 4.5] controlled objects adjusted too often
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
589164: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589164
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gnat-4.4

Version: 4.4.4-4

Severity: important



(From Dmitry A. Kazakov)



with Ada.Finalization;

with Ada.Unchecked_Deallocation;

with Ada.Text_IO;



procedure Controlled_Array is

   type T is new Ada.Finalization.Limited_Controlled with record

      C : Natural := 0;

   end record;

   overriding procedure Finalize (X : in out T);



   procedure Finalize (X : in out T) is

   begin

      if X.C = 0 then

         Ada.Text_IO.Put_Line ("Successful finalization");

      else

         Ada.Text_IO.Put_Line

           ("Illegal count in finalization" & Integer'Image (X.C));

         raise Program_Error;

      end if;

   end Finalize;



   type T_Ptr is access T'Class;

   type H is new Ada.Finalization.Controlled with record

      P : T_Ptr;

   end record;

   overriding procedure Finalize (X : in out H);

   overriding procedure Adjust (X : in out H);



   procedure Finalize (X : in out H) is

      procedure Free is new Ada.Unchecked_Deallocation (T'Class, T_Ptr);

   begin

      if X.P /= null then

         X.P.C := X.P.C - 1;

         if X.P.C = 0 then

            Free (X.P);

         end if;

      end if;

   end Finalize;

   procedure Adjust (X : in out H) is

   begin

      X.P.C := X.P.C + 1;

   end Adjust;



   type H_Array is array (Positive range <>) of H;



   function Create return H is

      Result : H;

   begin

      Result.P := new T;

      Result.P.C := 1;

      return Result;

   end Create;



   List  : H_Array := (Create, Create, Create);

   First : T_Ptr := List (List'First).P;

begin

   Ada.Text_IO.Put_Line ("Count" & Integer'Image (First.C));

end Controlled_Array; 



Expected output:



   $ ./controlled_array

   Count 1

   Successful finalization

   Successful finalization

   Successful finalization 



Actual output:



Count 2

Illegal count in finalization 1 







I believe that the following patch (in GCC 4.5) fixes this:



2009-04-17 Thomas Quinot <qui...@adacore.com>



   * exp_ch7.adb (Expand_Ctrl_Function_Call): Remove incorrect special

     case for the case of an aggregate component, the attach call for the

     result is actually needed.



   * exp_aggr.adb (Backend_Processing_Possible): Backend processing for

     an array aggregate must be disabled if the component type requires

     controlled actions.



   * exp_ch3.adb: Minor reformatting 



To be backported.



-- 

Ludovic Brenta.





--- End Message ---
--- Begin Message ---
Source: gnat-4.4
Source-Version: 4.4.4-5

We believe that the bug you reported is fixed in the latest version of
gnat-4.4, which is due to be installed in the Debian FTP archive:

gnat-4.4-base_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/gnat-4.4-base_4.4.4-5_amd64.deb
gnat-4.4_4.4.4-5.diff.gz
  to main/g/gnat-4.4/gnat-4.4_4.4.4-5.diff.gz
gnat-4.4_4.4.4-5.dsc
  to main/g/gnat-4.4/gnat-4.4_4.4.4-5.dsc
gnat-4.4_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/gnat-4.4_4.4.4-5_amd64.deb
libgnat-4.4-dbg_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnat-4.4-dbg_4.4.4-5_amd64.deb
libgnat-4.4_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnat-4.4_4.4.4-5_amd64.deb
libgnatprj-dev_4.4.4-5_all.deb
  to main/g/gnat-4.4/libgnatprj-dev_4.4.4-5_all.deb
libgnatprj4.4-dbg_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatprj4.4-dbg_4.4.4-5_amd64.deb
libgnatprj4.4-dev_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatprj4.4-dev_4.4.4-5_amd64.deb
libgnatprj4.4_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatprj4.4_4.4.4-5_amd64.deb
libgnatvsn-dev_4.4.4-5_all.deb
  to main/g/gnat-4.4/libgnatvsn-dev_4.4.4-5_all.deb
libgnatvsn4.4-dbg_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatvsn4.4-dbg_4.4.4-5_amd64.deb
libgnatvsn4.4-dev_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatvsn4.4-dev_4.4.4-5_amd64.deb
libgnatvsn4.4_4.4.4-5_amd64.deb
  to main/g/gnat-4.4/libgnatvsn4.4_4.4.4-5_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 589...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ludovic Brenta <lbre...@debian.org> (supplier of updated gnat-4.4 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 29 Jul 2010 12:35:51 +0200
Source: gnat-4.4
Binary: gnat-4.4-base gnat-4.4 libgnat-4.4 libgnat-4.4-dbg libgnatvsn-dev 
libgnatvsn4.4-dev libgnatvsn4.4 libgnatvsn4.4-dbg libgnatprj-dev 
libgnatprj4.4-dev libgnatprj4.4 libgnatprj4.4-dbg
Architecture: source all amd64
Version: 4.4.4-5
Distribution: unstable
Urgency: low
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Ludovic Brenta <lbre...@debian.org>
Description: 
 gnat-4.4   - The GNU Ada compiler
 gnat-4.4-base - The GNU Compiler Collection (gnat base package)
 libgnat-4.4 - Runtime library for GNU Ada applications
 libgnat-4.4-dbg - Runtime library for GNU Ada applications
 libgnatprj-dev - GNU Ada compiler version library - development files
 libgnatprj4.4 - GNU Ada Project Manager
 libgnatprj4.4-dbg - GNU Ada Project Manager
 libgnatprj4.4-dev - GNU Ada Project Manager development files
 libgnatvsn-dev - GNU Ada compiler version library - development files
 libgnatvsn4.4 - GNU Ada compiler version library
 libgnatvsn4.4-dbg - GNU Ada compiler version library
 libgnatvsn4.4-dev - GNU Ada compiler version library - development files
Closes: 589164
Changes: 
 gnat-4.4 (4.4.4-5) unstable; urgency=low
 .
   * debian/patches/ada-bug589164.diff: new.  Closes: #589164.
Checksums-Sha1: 
 94bc812c71989c45ee07942753764a4884218eea 2467 gnat-4.4_4.4.4-5.dsc
 409680ceb546d0177da69adbff8daab708650041 591462 gnat-4.4_4.4.4-5.diff.gz
 0bb82848617fa77342a96161a729de7db42739d7 818 libgnatvsn-dev_4.4.4-5_all.deb
 46fc1e44d9dcf7ddc5cd180a3b12ef93685d1134 816 libgnatprj-dev_4.4.4-5_all.deb
 f7006c62d4ba4ecddfafffef5f54ce3c5510aa4f 134064 gnat-4.4-base_4.4.4-5_amd64.deb
 1b53b3f8c7cb24bcc7d7607d3e036b35041a9e55 1148412 libgnat-4.4_4.4.4-5_amd64.deb
 a456a402a0248601a5b8099fcb1db6bd7a1b64a4 1716458 
libgnatvsn4.4-dev_4.4.4-5_amd64.deb
 e70549249ea662d8367a55b98e283b050a905b1f 335582 libgnatvsn4.4_4.4.4-5_amd64.deb
 89b62e763dba900d2e4aa8e8bb8e1db2bd391215 2656324 
libgnatprj4.4-dev_4.4.4-5_amd64.deb
 341674a6ff60bcc2a8392b08ee65ed4fe4f3bdc3 578444 libgnatprj4.4_4.4.4-5_amd64.deb
 4534e4dd2a48fcc0e0d51bdaa3f7b7657498f6f8 880864 
libgnatprj4.4-dbg_4.4.4-5_amd64.deb
 d5460123121d5795423ba718ece141073cba1df5 1950084 
libgnat-4.4-dbg_4.4.4-5_amd64.deb
 b86a1b6ecba08ffa2e9253fc8a575ba7d7597d0e 458278 
libgnatvsn4.4-dbg_4.4.4-5_amd64.deb
 d1d3fb73b279658514ac795f2f19b523d0988f82 14925204 gnat-4.4_4.4.4-5_amd64.deb
Checksums-Sha256: 
 c7ee8219bddd6d1192d106f3c6d2d2916e58bed5b1741e2f8fbacb8d2340f8d8 2467 
gnat-4.4_4.4.4-5.dsc
 ed60ef7119db472d8d92e52bef26c03eb3e62290d5942d06637420e3b813aeb6 591462 
gnat-4.4_4.4.4-5.diff.gz
 1dd62c50cd316be381be63f0f36bdc58ce37c278704c86357382f97d33425d6f 818 
libgnatvsn-dev_4.4.4-5_all.deb
 3b49ea0c00757e3edf721bf46c12f16950226e22fe41220a5dee390f96752ad1 816 
libgnatprj-dev_4.4.4-5_all.deb
 c2510f925283e9da56a6cf2aa342edd46b162c5edfa0ee7cfe36e06f0b8c6c0f 134064 
gnat-4.4-base_4.4.4-5_amd64.deb
 f7a3f95782c533354eeeb34443f01a7b9461603931456e7c975de7d0c7642bd4 1148412 
libgnat-4.4_4.4.4-5_amd64.deb
 c2aaedc288696c9d3c672f4c61f3117c614f5b0b7f981a937fa7769e73aacda0 1716458 
libgnatvsn4.4-dev_4.4.4-5_amd64.deb
 58b09c9dae4a9ef564c0dba747e0faf08ce373a3982d73b95d7f38f40a6c503b 335582 
libgnatvsn4.4_4.4.4-5_amd64.deb
 7c342148dd065115e19e537dfa6d2d2a01a75d1ab264646b8c9e75498c94d82e 2656324 
libgnatprj4.4-dev_4.4.4-5_amd64.deb
 db1ff70f6af588075ac7e1b1d45c4912fe12dc2f812112a3864035da7fcc33c0 578444 
libgnatprj4.4_4.4.4-5_amd64.deb
 f0af0a9a33f7eadddb93c239b2963e4e1609af6b9faceba182967f22a008550b 880864 
libgnatprj4.4-dbg_4.4.4-5_amd64.deb
 81b816fa5dc9869d08f51764f6cd9eea091a52330a77c472307571f07784fa8a 1950084 
libgnat-4.4-dbg_4.4.4-5_amd64.deb
 da59fff9392c96e3140ba473a2ed6452648d099c1a91d7a9a2afce637a3b147b 458278 
libgnatvsn4.4-dbg_4.4.4-5_amd64.deb
 d0c338aaef80da626136690e579920333bf09f503a11bd47bd7984107af8efd9 14925204 
gnat-4.4_4.4.4-5_amd64.deb
Files: 
 e63343c246a06c68e0290bce9a035821 2467 devel optional gnat-4.4_4.4.4-5.dsc
 447986c68aca4349acb5b6e9db32cc49 591462 devel optional gnat-4.4_4.4.4-5.diff.gz
 7d7dd150b7ffa700540d7bce73d3931c 818 libdevel optional 
libgnatvsn-dev_4.4.4-5_all.deb
 0a4de2d8678e78503f24f1a9b2504b2b 816 libdevel optional 
libgnatprj-dev_4.4.4-5_all.deb
 422fc711054bd0eb7e37b17038a7078b 134064 libs optional 
gnat-4.4-base_4.4.4-5_amd64.deb
 6635ab0dcacf1496fd4cf22cfc440205 1148412 libs optional 
libgnat-4.4_4.4.4-5_amd64.deb
 7b88f785d64891a579464542e6745b8e 1716458 libdevel optional 
libgnatvsn4.4-dev_4.4.4-5_amd64.deb
 5b9148c369acb61ef73476472e8a3555 335582 libs optional 
libgnatvsn4.4_4.4.4-5_amd64.deb
 c091187e506f04fb038684cdfe02e2aa 2656324 libdevel optional 
libgnatprj4.4-dev_4.4.4-5_amd64.deb
 0caf0f7bc386c2543f4959b12c0f9556 578444 libs optional 
libgnatprj4.4_4.4.4-5_amd64.deb
 4104371b63fa9a316ca58b2b72ac92e1 880864 debug extra 
libgnatprj4.4-dbg_4.4.4-5_amd64.deb
 14bbafab2a3657f98f8f0cb17a76b722 1950084 debug extra 
libgnat-4.4-dbg_4.4.4-5_amd64.deb
 c51c811352285adbb6871d5355d7caed 458278 debug extra 
libgnatvsn4.4-dbg_4.4.4-5_amd64.deb
 b2ea4663ed5c462ca57352d404a17443 14925204 devel optional 
gnat-4.4_4.4.4-5_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFMVKfmx9kwJZ3/qtQRAn+IAJ9NvRlcocBmaDY5P5HaLaQMIxHU3ACfUBe6
v7KaXULQ85SsjTh0CDayUV8=
=oQCZ
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to