From: ahlan@marriott.org
Subject: Re: bug in gnatgpl 2015?
Date: Tue, 1 Sep 2015 06:45:37 -0700 (PDT)
Date: 2015-09-01T06:45:37-07:00 [thread overview]
Message-ID: <52857004-dc02-419e-9917-1450741708a0@googlegroups.com> (raw)
In-Reply-To: <32c623ac-817e-46fc-bb13-c77b47a506a7@googlegroups.com>
On Monday, August 31, 2015 at 9:34:43 AM UTC+2, Leo Brewin wrote:
> Greetings,
>
> 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).
>
> I get no problems when using Simon's gcc-5.1.0 compiler.
>
> I'm using MacOSX 10.10.5 with the command line tools from Xcode 6.4.
>
> Cheers,
> Leo
>
> Here are the two packages,
> crash.adb/crash.ads
> simplex.adb/simplex.ads
>
> -- crash.ads --------------------------
> package crash is
> procedure foo;
> end crash;
>
> -- crash.adb --------------------------
> with simplex;
>
> package body crash is
>
> package std_lattice is new Simplex (n_head_max => 50);
>
> use std_lattice;
>
> procedure foo is
> begin
> null;
> end foo;
>
> end crash;
>
> -- simplex.ads ------------------------
> generic
>
> n_head_max : Integer := 5;
>
> package Simplex is
>
> procedure deallocate;
> type myArray1dIntg is array (Integer range <>) of Integer;
> type myArray1dIntg_ptr is access myArray1dIntg;
>
> private
>
> head_ptr : myArray1dIntg_ptr := new myArray1dIntg (0 .. 1);
>
> head : myArray1dIntg renames head_ptr.all;
>
> end Simplex;
>
> -- simplex.adb ------------------------
> package body Simplex is
>
> procedure deallocate is
> begin
> null;
> end deallocate;
>
> procedure clear is
> begin
> head (1) := 1;
> end clear;
>
> procedure add is
> begin
> head (1) := 1;
> end add;
>
> end Simplex;
A forgot to qualify by remark: I conducted my tests under Windows not OSX
next prev parent reply other threads:[~2015-09-01 13:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 7:34 bug in gnatgpl 2015? Leo Brewin
2015-08-31 8:48 ` Simon Wright
2015-08-31 9:19 ` Leo Brewin
2015-08-31 10:51 ` Peter Chapin
2015-08-31 15:54 ` Anh Vo
2015-08-31 23:33 ` Anh Vo
2015-08-31 23:37 ` Leo Brewin
2015-08-31 23:55 ` Leo Brewin
2015-08-31 23:35 ` Leo Brewin
2015-09-01 0:33 ` Leo Brewin
2015-09-01 1:24 ` Anh Vo
2015-09-01 12:42 ` Simon Wright
2015-09-01 7:44 ` Markus Schöpflin
2015-09-01 9:17 ` G.B.
2015-09-01 13:43 ` ahlan
2015-09-01 13:45 ` ahlan [this message]
2015-09-10 7:31 ` Jerry van Dijk
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox