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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d65138770e3daae3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.220.230 with SMTP id pz6mr17738441pbc.3.1340741290558; Tue, 26 Jun 2012 13:08:10 -0700 (PDT) Path: l9ni23130pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Keean Schupke Newsgroups: comp.lang.ada Subject: Re: Refactoring for error: cannot inline "X" (forward instance within enclosing body) Date: Tue, 26 Jun 2012 13:06:33 -0700 (PDT) Organization: http://groups.google.com Message-ID: <422659c0-fef0-4daa-8bc6-ca94fa3a332b@googlegroups.com> References: <7a18bc7e-2541-46f9-9d92-65d87fed06e6@googlegroups.com> <4fe9859d$0$6553$9b4e6d93@newsspool4.arcor-online.net> <2d7d1e52-4af4-493a-87cb-00f1e1740066@googlegroups.com> <55ac060b-09ee-4117-8d39-72f1a8b40c85@googlegroups.com> NNTP-Posting-Host: 82.44.19.199 Mime-Version: 1.0 X-Trace: posting.google.com 1340741290 17193 127.0.0.1 (26 Jun 2012 20:08:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 26 Jun 2012 20:08:10 +0000 (UTC) In-Reply-To: <55ac060b-09ee-4117-8d39-72f1a8b40c85@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.44.19.199; posting-account=T5Z2vAoAAAB8ExE3yV3f56dVATtEMNcM User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-06-26T13:06:33-07:00 List-Id: On Tuesday, 26 June 2012 16:42:09 UTC+1, Keean Schupke wrote: > On Tuesday, 26 June 2012 12:53:35 UTC+1, Keean Schupke wrote: > > On Tuesday, 26 June 2012 10:49:23 UTC+1, Georg Bauhaus wrote: > > > On 26.06.12 09:51, Keean Schupke wrote: > > > > > > > Here's the minimal test example (as minimal as I can make it so far...): > > > > > > -gnatN makes this work. > > > > > > Ah, -gnatN does not fix my project, so I need to produce an updated example. > > > > Cheers, > > Keean. > > This example is simplified a bit more and still causes the problem with -gnatN. > > > > procedure Test is > generic > package A is end; > > generic > package B is > procedure F; > pragma Inline_Always(F); > end B; > > package body B is > procedure F > is begin null; > end F; > end B; > > package C is > package My_A is new A; > package My_B is new B; > end C; > begin > null; > end Test; > > > > The following compiles fine: > > > > procedure Test is > generic > package A is end; > > generic > package B is > procedure F; > pragma Inline_Always(F); > end B; > > package body B is > procedure F > is begin null; > end F; > end B; > > package My_A is new A; > package My_B is new B; > begin > null; > end Test; > > > Cheers, > Keean. So the question is why does this compile without the "C" package? Can anyone explain to my why the compiler cannot inline when package "C" is there? Cheers, Keean.