From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT Error? Date: Sat, 17 Feb 2024 00:04:21 -0600 Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Sat, 17 Feb 2024 06:03:20 -0000 (UTC) Injection-Info: dont-email.me; posting-host="3d7627b51622d224efea6204d304c23a"; logging-data="318172"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9nzOfUdIeVxM9xBTPfWaKKbnkTcfQ6RM=" Cancel-Lock: sha1:tmoe33k7v2xR964nYMl+rXGqrM4= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-RFC2646: Format=Flowed; Response X-MSMail-Priority: Normal X-Priority: 3 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Xref: news.eternal-september.org comp.lang.ada:66068 List-Id: I don't see anything wrong with that off-hand. It's probably a compiler bug of some sort. - Randy. "Jeffrey R.Carter" wrote in message news:uqos24$3rue0$2@dont-email.me... > On 2024-02-17 00:26, Niklas Holsti wrote: >> >> You showed two copies of the declaration (spec) of package Alloc_Err, but >> you did not show the body of the package. Based on the error message >> pointing to alloc_err.adb (and not .ads), GNAT thinks the error is in the >> body. Please show the body of the package. >> > > Oops. Well, I've managed to simplify the reproducer to > > procedure Alloc2 is > type Grid is array (Positive range <>, Positive range <>) of Integer > with > Dynamic_Predicate => Grid'First (1) = 1 and Grid'First (2) = 1; > > type Grid_Ptr is access Grid; > > Data : Grid_Ptr := new Grid (1 .. 10, 1 .. 20); > begin -- Alloc2 > null; > end Alloc2; > > which results in > > alloc2.adb:7:23: error: invalid use of subtype mark in expression or call > > Line 7 is the declaration of Data. > > -- > Jeff Carter > "I like it when the support group complains that they have > insufficient data on mean time to repair bugs in Ada software." > Robert I. Eachus > 91 >