comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT bugs around use of "for X'Address..." clause
Date: Fri, 22 May 2015 08:38:35 +0100
Date: 2015-05-22T08:38:35+01:00	[thread overview]
Message-ID: <lylhghxds4.fsf@pushface.org> (raw)
In-Reply-To: c0275141-4bdc-4e47-bb01-c7af6f774926@googlegroups.com

erik.shadwick@gmail.com writes:

> Should I be submitting this to AdaCore, or GCC's
> http://gcc.gnu.org/bugs.html bug tracker? When running this with my
> copy of GNAT free/GPL, it suggests the former, but when compiling it
> through ideone.com I get the message to put it into GCC's tracker. It
> detects the error in "in gnat_to_gnu_entity, at
> ada/gcc-interface/decl.c:347".

FSF GCC 4.9.1 raises a bug box (in a different place).
5.1.0 doesn't crash, but says (as I expected)

warning: default initialization of "X" may modify overlaid storage
warning: use pragma Import for "X" to suppress initialization (RM B.1(24))

(that is, "X : P.Checked_T with Import, Convention => Ada;")

Unfortunately, fixing that doesn't make your problem go away.

You could wait for GNAT GPL 2015, or you could try the FSF 5.1.0 at [1].

> Further, what is the validity of assigning to a variable that has the
> 'Address clause on it -- is it legal and defined behaviour?

Yes, but writing to System.Null_Address will probably not produce useful
behaviour. What you have here is an interaction between the type
invariant and the address setting.

[1] https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/5.1.0/


  reply	other threads:[~2015-05-22  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  6:23 GNAT bugs around use of "for X'Address..." clause erik.shadwick
2015-05-22  7:38 ` Simon Wright [this message]
2015-05-22  8:08   ` erik.shadwick
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox