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!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How can one record component be local and another not? Date: Sat, 9 May 2020 22:43:33 +0300 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net QtEg3XjIIIJz3I5gzqX0TQigmaQwV7h4gBJakhvAvCeNzspWJG Cancel-Lock: sha1:G6PBdIBqbrFoAb8CmEbQxKMM5wo= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58641 Date: 2020-05-09T22:43:33+03:00 List-Id: On 2020-05-06 22:31, hreba wrote: > On 5/5/20 9:08 PM, Niklas Holsti wrote: >> >> I don't understand -- System.Address is not an access type; why do you >> need to use an access type to produce this parameter? Do you need a >> pointer to the "params" component? >> >> Perhaps you can show a bit more of the actual code that has the problem? >> > > Ok, I'll try to make it comprehensible without throwing a lot of code at > you. Thanks, and apologies for a late response (and this isn't a full response yet). [snip] >       sol.all_pp:= sol.all_pars'Unchecked_Access; [snip] > The above version compiles. At first I didn't have the Solver component > all_pp, but passed app_pars'Address to the call of > gsl_odeiv2_driver_alloc_y_new at the end of Init_Solve. It too compiled. > > But whatever I try, I don't get rid of the runtime error > > raised CONSTRAINT_ERROR : odeiv2.ads:92:4 access check failed Do you mean that the exception occurs even with Unchecked_Access (as in the code you displayed) instead of plain Access? > It accuses the line > >    type Parameters is record If the exception still happens with Unchecked_Access, can you get a full trace-back to show where the accessibility check is invoked? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .