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: 103376,bdebc54a485c13a4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.74.201 with SMTP id w9mr26715812pbv.0.1332948641589; Wed, 28 Mar 2012 08:30:41 -0700 (PDT) Path: z9ni11713pbe.0!nntp.google.com!news2.google.com!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: My first compiler bug: work around or redesign? Date: Wed, 28 Mar 2012 15:30:41 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <2229037.332.1332788108220.JavaMail.geo-discussion-forums@vbht7> Mime-Version: 1.0 Injection-Date: Wed, 28 Mar 2012 15:30:41 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="Mda950WjNwNLAFOE7yJXQw"; logging-data="30489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181E4BEUh+O6wDCiArEr9/i" User-Agent: slrn/0.9.9p1 (FreeBSD) Cancel-Lock: sha1:kpvn6k6GxTlnbmAe48qMmy7tiWE= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: 2012-03-28T15:30:41+00:00 List-Id: On 2012-03-26, Ludovic Brenta wrote: > Report it to the FSF at http://gcc.gnu.org/bugzilla. IMHO, a public bug > database is worth a thousand private ones. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52752 Below is the minimal testcase I have worked out. Is there anything I should do at this point? Or will everything leading to a fix be handled from there? Thanks for your help, Natasha package Test is type Callback is access procedure (State : in String); procedure Sample (State : in String; Action : in not null Callback); end Test; package body Test is procedure Simple_Init; generic with procedure Init; procedure Generic_Sample (State : in String; Action : in not null Callback); procedure Simple_Init is begin null; end Simple_Init; procedure Generic_Sample (State : in String; Action : in not null Callback) is begin Init; Action.all (State); end Generic_Sample; procedure Sample_Instance is new Generic_Sample (Simple_Init); procedure Sample (State : in String; Action : in not null Callback) renames Sample_Instance; end Test; with Ada.Text_IO; with Test; procedure Testcase is State : constant String := "Testcase"; begin Test.Sample (State, Ada.Text_IO.Put_Line'Access); end Testcase;