From: "Alexander S. Mentis" <foo@invalid.invalid>
Subject: Re: GNAT bug - still in 2010?
Date: Wed, 27 Oct 2010 16:11:23 +0000 (UTC)
Date: 2010-10-27T16:11:23+00:00 [thread overview]
Message-ID: <ia9iva$o2o$1@news.eternal-september.org> (raw)
In-Reply-To: 6cebf1a3-3b2a-4e79-a39e-669a6a5ca00c@l20g2000yqm.googlegroups.com
Maciej Sobczak wrote:
> Consider:
>
> with Ada.Unchecked_Deallocation;
>
> procedure Test is
>
> package P is
> type My_Interface is limited interface;
> procedure Do_Something (X : in out My_Interface) is abstract;
> end P;
>
> protected type My_Protected is new P.My_Interface with
> overriding
> procedure Do_Something;
> end My_Protected;
>
> protected body My_Protected is
> overriding
> procedure Do_Something is
> begin
> null;
> end Do_Something;
> end My_Protected;
>
> type My_Protected_Ptr is access My_Protected;
>
> procedure Free is new Ada.Unchecked_Deallocation
> (Object => My_Protected, Name => My_Protected_Ptr);
>
> Ptr : My_Protected_Ptr;
>
> begin
> -- here come dragons:
> --Free (Ptr);
> null;
> end Test;
>
>
> If the indicated line (call to Free) is uncommented, GNAT crashes in
> flames (GNAT BUG DETECTED).
>
> I was finally able to reduce this to a minimal example, which might be
> a good candidate for bug report (one in the long series of bugs
> related to interfaces), but before I submit it I would like to kindly
> ask you to confirm if this is still the case with GNAT 2010.
> Certainly the bug is in versions GPL 2009 (20090519) and in 4.4.0
> 20080314.
Yes, under Windows it demonstrates the same behavior.
next prev parent reply other threads:[~2010-10-27 16:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 15:00 GNAT bug - still in 2010? Maciej Sobczak
2010-10-27 16:11 ` Alexander S. Mentis [this message]
2010-10-27 20:43 ` Maciej Sobczak
2010-10-31 21:24 ` Maciej Sobczak
2010-11-01 9:23 ` Maciej Sobczak
2010-10-27 21:09 ` Georg Bauhaus
2010-10-27 21:21 ` Maciej Sobczak
2010-10-27 21:56 ` Simon Wright
2010-10-28 8:31 ` Maciej Sobczak
2010-10-28 7:17 ` Timo Warns
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox