This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada question about PR 18434
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: Arnaud Charlet <charlet at adacore dot com>, Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>, gcc at gcc dot gnu dot org
- Date: Sat, 01 Oct 2005 16:02:16 +0200
- Subject: Re: Ada question about PR 18434
- References: <1128112128.12250.124.camel@pc.site> <433E82FD.5020600@adacore.com>
(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