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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.13.136 with SMTP id c8mr13304176qaa.0.1377186017597; Thu, 22 Aug 2013 08:40:17 -0700 (PDT) X-Received: by 10.50.32.7 with SMTP id e7mr1250578igi.0.1377186017552; Thu, 22 Aug 2013 08:40:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder02.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!fx3no4002564qab.0!news-out.google.com!he10ni3061qab.0!nntp.google.com!fx3no4002562qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 Aug 2013 08:40:17 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=RxNzCgoAAACA5KmgtFQuaU-WaH7rjnAO NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <73a61aed-a50a-4c80-92db-917caace23b7@googlegroups.com> Subject: Re: Access check failed without using the word "access" in source From: Adam Beneschan Injection-Date: Thu, 22 Aug 2013 15:40:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2735 Xref: news.eternal-september.org comp.lang.ada:16933 Date: 2013-08-22T08:40:17-07:00 List-Id: On Thursday, August 22, 2013 7:26:36 AM UTC-7, Natasha Kerensikova wrote: > So from what I understand here, P.C.Process doesn't return a P.I'Class > object (as in the actual source) but rather an access (or a pointer, not > sure about the correct vocabulary at this level), which a reasonable > implementation. Sure, it would be common for an implementation to return a pointer when the= return type is something whose size isn't determinable beforehand (such as= an unconstrained array or I'Class). However, since implicit pointers like= this aren't access objects (as defined by Ada), they shouldn't be causing = Constraint_Errors. It's definitely possible for an *accessibility* check to fail even when the= re are no access objects in the program (that can happen when a tagged type= inside a function is derived from a type outside the function, and the fun= ction tries to return an object of the inside type, which fails because the= outside world isn't allowed to see any objects of the inside type). But a= ccessibility check failures raise Program_Error. It definitely looks like = something is being checked for null. So I'd say this is a definite compile= r bug. For what it's worth, I don't think you need the Create to reproduce the pro= blem; if you remove it, and remove the Self parameter from one of the Proce= ss functions, it still fails. But it doesn't fail if the main program call= s that Process directly instead of the one with the String parameter. -- Adam