(I indeed forgot about the static model which is the default for GNAT)

On Sat, 2005-10-01 at 08:37 -0400, Robert Dewar wrote:
> [...] You can of course check the order of elaboration by
> looking at it. I would be surprised if there were a
> bug in the statid elab model for such a simple case,
> and indeed the elab order is certainly right in my
> builds.

Looking at build/gcc/ada/tools/b_gnatm.c in my latest HEAD full
bootstrap on x86-linux:

$ make bootstrap
...
../../gnatbind -C -I- -I../rts -I. -I/home/guerby/work/gcc/version-head/gcc/ada 
-o b_gnatm.c gnatmake.ali
...
$ cat gcc/ada/tools/b_gnatm.c 
...
void adainit (void)
{
...
   osint___elabs ();
   osint__m___elabb ();
   osint__m_E++;
...
   osint___elabb ();
   osint_E++;
...
}
...

If I'm reading it correctly, osint body is elaborated after osint.m one,
so there seem to be a bug. 

May be it doesn't trigger because in some
condition/platform no code is needed at runtime for the default
initialization of integer variables by a constant (done at link time)
whereas on other platform it's not the case (does gnatbind knows about
that?).

Laurent


Reply via email to