From: Keean Schupke <keean.schupke@googlemail.com>
Subject: Re: Refactoring for error: cannot inline "X" (forward instance within enclosing body)
Date: Tue, 26 Jun 2012 13:06:33 -0700 (PDT)
Date: 2012-06-26T13:06:33-07:00 [thread overview]
Message-ID: <422659c0-fef0-4daa-8bc6-ca94fa3a332b@googlegroups.com> (raw)
In-Reply-To: <55ac060b-09ee-4117-8d39-72f1a8b40c85@googlegroups.com>
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.
next prev parent reply other threads:[~2012-06-26 20:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 13:02 Refactoring for error: cannot inline "X" (forward instance within enclosing body) Keean Schupke
2012-06-25 13:03 ` Keean Schupke
2012-06-25 19:47 ` Brian Drummond
2012-06-26 7:51 ` Keean Schupke
2012-06-26 9:49 ` Georg Bauhaus
2012-06-26 11:53 ` Keean Schupke
2012-06-26 15:42 ` Keean Schupke
2012-06-26 20:06 ` Keean Schupke [this message]
2012-06-26 10:44 ` Brian Drummond
2012-06-26 22:43 ` Randy Brukardt
2012-06-27 10:04 ` Keean Schupke
2012-06-27 17:26 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox