[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types

2011-11-02 Thread simon at pushface dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934

simon at pushface dot org changed:

   What|Removed |Added

Summary|Allocated address for new   |Attribute
   |controlled object is offset |Max_Size_In_Storage_Element
   |by 16 bytes |s is wrong for controlled
   ||types
  Build|x86_64-apple-darwin11   |
   Severity|major   |normal


[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types

2011-11-03 Thread simon at pushface dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934

--- Comment #2 from simon at pushface dot org 2011-11-03 08:14:36 UTC ---
Created attachment 25699
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25699
Simpler demonstrator


[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types

2011-11-03 Thread simon at pushface dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934

--- Comment #3 from simon at pushface dot org 2011-11-03 17:34:01 UTC ---
(In reply to comment #1)

> It seems to me that this new approach is a remarkably non-Ada way of 
> addressing
> the problem; the original design is precisely the way that it should be
> addressed. Of course I have absolutely no objection to delegating this
> management to Ada.Finalization.Heap_Management (I think this should now in 
> fact
> be System.Finalization_Masters). But System.Finalization_Root.Root_Controlled
> should contain a System.Finalization_Masters.FM_Node.

Apologies all round; this isn't correct, because a type with a component of a
controlled type also needs finalization support; for example,

   type E is record
  Str : Ada.Strings.Unbounded.Unbounded_String;
   end record;
   type E_P is access E;
   for E_P'Storage_Size use E'Max_Size_In_Storage_Elements * 4;


[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types

2012-05-27 Thread simon at pushface dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934

--- Comment #4 from simon at pushface dot org 2012-05-27 10:22:42 UTC ---
This problem has been fixed in the released 4.7.0.


[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types

2012-05-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
URL||http://gcc.gnu.org/ml/gcc-c
   ||vs/2011-11/msg00869.html
 CC||ebotcazou at gcc dot
   ||gnu.org
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #5 from Eric Botcazou  2012-05-27 
11:00:27 UTC ---
Indeed.