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 X-Received: by 10.52.156.98 with SMTP id wd2mr17415411vdb.10.1441006481409; Mon, 31 Aug 2015 00:34:41 -0700 (PDT) X-Received: by 10.182.32.68 with SMTP id g4mr308182obi.31.1441006481371; Mon, 31 Aug 2015 00:34:41 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!105no45893qgp.1!news-out.google.com!f6ni10536igi.0!nntp.google.com!i7no145783igu.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 31 Aug 2015 00:34:40 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=118.209.113.230; posting-account=l8GBMwoAAADCbqdOJSbg4dBRqkD14dJd NNTP-Posting-Host: 118.209.113.230 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <32c623ac-817e-46fc-bb13-c77b47a506a7@googlegroups.com> Subject: bug in gnatgpl 2015? From: Leo Brewin Injection-Date: Mon, 31 Aug 2015 07:34:41 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:27645 Date: 2015-08-31T00:34:40-07:00 List-Id: 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;