https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124016

--- Comment #2 from Liam Powell <liam at liampwll dot com> ---
I don't want to create too many new issues if you're already tracking this
internally, so I'll just put this here. Finalization on that type is also
broken:

with Ada.Containers; use Ada.Containers;
with Ada.Containers.Bounded_Indefinite_Holders;

procedure Example is
    package Tiny_Holders is new Bounded_Indefinite_Holders (Integer, 16);
    package Big_Holders is new
       Bounded_Indefinite_Holders
          (Tiny_Holders.Holder,
           1000,
           Tiny_Holders."=");
    X : Tiny_Holders.Holder := Tiny_Holders.To_Holder (1);
    Y : Big_Holders.Holder := Big_Holders.To_Holder (X);
begin
    null;
end Example;

raised PROGRAM_ERROR :
System.Finalization_Primitives.Attach_Object_To_Collection: attachment after
finalization started

Reply via email to