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.58.109.226 with SMTP id hv2mr8253170veb.33.1382968171460; Mon, 28 Oct 2013 06:49:31 -0700 (PDT) X-Received: by 10.182.231.227 with SMTP id tj3mr3210obc.40.1382968171050; Mon, 28 Oct 2013 06:49:31 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!o2no5894247qas.0!news-out.google.com!rn2ni128316pbc.1!nntp.google.com!o2no5894228qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 28 Oct 2013 06:49:30 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=137.121.198.151; posting-account=cumtSQoAAABneUE0cNB48vDg9pu8LzVu NNTP-Posting-Host: 137.121.198.151 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4395468b-93d3-45f4-8bc0-91cd646ff1d9@googlegroups.com> Subject: Warning: accessibility check failure with GNAT GPL 2013 From: sangomarco@gmail.com Injection-Date: Mon, 28 Oct 2013 13:49:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2544 Xref: number.nntp.dca.giganews.com comp.lang.ada:183745 Date: 2013-10-28T06:49:30-07:00 List-Id: Hi, I have the accessibility check failure with GNAT GPL version 2013. When I t= ry to instantiate a task type in a task body (warning line -- Next :=3D New= _Thread; -- see my code below), I have the following warning : accessibilit= y check failure, program_Error will be raised at runtime. However, I don't have any warning when I compile with the last version GNA= T GPL 2012.=20 What it's the problem and how I can resolve this. Thanks in adavance for your help. Below is my code : ----------------- with Threads; Procedure Main is package Tasks_Inst is new Threads (Integer,1); use Tasks_Inst; begin Tasks_Inst.Run_Threads(3); end Main; ----------------- generic type Element is private; Unit: in Element; Package Threads is procedure Run_Threads (Test_Element : in Element); end Threads; ----------------- package body Threads is Procedure Run_Threads (Test_Element : in Element) is task type Cyclic_Thread; function New_Thread return access Cyclic_Thread is begin return new Cyclic_Thread; end New_Thread; task body Cyclic_Thread is Next : access Cyclic_Thread; begin if Next =3D null then Next :=3D New_Thread; ------ warning line end if; end Cyclic_Thread; First : access Cyclic_Thread; E : Element :=3D unit; begin First :=3D New Cyclic_Thread; end Run_Threads; end Threads;