From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,268e52cd81f7181c,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!l20g2000yqm.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: GNAT bug - still in 2010? Date: Wed, 27 Oct 2010 08:00:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6cebf1a3-3b2a-4e79-a39e-669a6a5ca00c@l20g2000yqm.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1288191644 4203 127.0.0.1 (27 Oct 2010 15:00:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 27 Oct 2010 15:00:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l20g2000yqm.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14835 Date: 2010-10-27T08:00:44-07:00 List-Id: 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. -- Maciej Sobczak * http://www.inspirel.com