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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: bug in gnatgpl 2015? Date: Mon, 31 Aug 2015 09:48:14 +0100 Organization: A noiseless patient Spider Message-ID: References: <32c623ac-817e-46fc-bb13-c77b47a506a7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="0903b4fccd19524a858dd481bbd547d7"; logging-data="31894"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UUKf8xi6uiJL18tD/sl1CSjcLjRHKbvE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:Mle5hOF0ZZgT3KV6CRtgDc3pzBs= sha1:K69Gnwe4aAC7nRC9jYQarqrSfFA= Xref: news.eternal-september.org comp.lang.ada:27646 Date: 2015-08-31T09:48:14+01:00 List-Id: Leo Brewin writes: > I've run into what I think is a bug in gnatgpl 2015. > I wonder if others could confirm the bug? > > I've tried to make the code as short as possible while still > capturing the alleged bug. > > Using gnatgpl 2015 from Adacore, I get > > gnatmake crash.adb > > gcc -c crash.adb > > raised CONSTRAINT_ERROR : erroneous memory access > gnatmake: "crash.adb" compilation error > > and on occassions a detailed report (too long to include here but will > be sent to Adacore if need be). Yes. Also, the reported point of error in the long report seems to vary with the optimisation level. > head : myArray1dIntg renames head_ptr.all; The problem seems to go away if you eliminate this declaration, and use head_ptr[.all] instead.