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!aioe.org!.POSTED.uXrAive4syBshMNrwOgj/g.user.gioia.aioe.org!not-for-mail From: russ lyttle Newsgroups: comp.lang.ada Subject: Re: Gnat Problem - Freezing too soon Date: Fri, 1 Mar 2019 16:50:10 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <2c369d78-70ea-4593-af3d-e014b0c1fc00@googlegroups.com> NNTP-Posting-Host: uXrAive4syBshMNrwOgj/g.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55756 Date: 2019-03-01T16:50:10-05:00 List-Id: On 3/1/19 11:54 AM, Anh Vo wrote: > On Friday, March 1, 2019 at 6:21:26 AM UTC-8, russ lyttle wrote: >> On 2/28/19 7:49 PM, Anh Vo wrote: >>> On Thursday, February 28, 2019 at 2:11:11 PM UTC-8, russ lyttle wrote: >>>> On 2/28/19 4:22 PM, Simon Wright wrote: >>>>> russ lyttle writes: >>>>> >>>>>> Example from the bookAnalysable Real-Time Systems : >>>>>> >>> --------- >>>> >>>> Would I be submitting a bug report against an already patched version of >>>> gnat? >>> >>> Again, please post sporadics.ads in its entirety. So, we can duplicate your finding or not. >>> >>> >> Thanks for responding. We found it definitely a bug in gnat and are >> submitting a bug report. > > It is fine to send in a report if you are confident that it is a bug in latest GNAT. Otherwise, we would like to see the content of sporadics.ads. So, we can either confirm or not your finding. > > Here they are. These are from Analysable Real-Time Systems Progrmmed in Ada, Chap.20, Pg. 472-473. Line 29 gives different error from line 44. Full code for sporadics.ads: with System; use System; with Ada.Real_Time; use Ada.Real_Time; package Sporadics is type Sporadic_Invoke_Interface is Synchronized Interface; procedure Start (S: in out Sporadic_Invoke_Interface) is abstract; type Any_Sporadic_Invoke_Interface is access all Sporadic_Invoke_Interface'Class; type Sporadic_Thread_Interface is Synchronized Interface; procedure Wait_Start (S: in out Sporadic_Thread_Interface) is abstract; type Any_Sporadic_Thread_Interface is access all Sporadic_Thread_Interface'Class; type Sporadic_State is abstract tagged record Pri : Priority; Ceiling_Priority : Priority; MIT_In_Mili : Time_Span; end record; procedure Initialize_Code (S: in out Sporadic_State) is abstract; procedure Sporadic_Code (S: in out Sporadic_State) is abstract; type Any_Sporadic_State is access all Sporadic_State'Class; protected type Sporadic_Agent (S: Any_Sporadic_State) --with Priority => S.Ceiling_Prioriy is new Sporadic_Invoke_Interface and Sporadic_Thread_Interface with -- for the Start operation overriding procedure Start; overriding entry Wait_Start; private Start_Open : Boolean := False; end Sporadic_Agent; task type Sporadic (S : Any_Sporadic_State; A : Any_Sporadic_Thread_Interface) with Priority => S.pri is end Sporadic; end Sporadics; ----------------------------------------------------------------------- Full code for sporadics.adb: package body Sporadics is protected body Sporadic_Agent is procedure Start is begin Start_Open := False; end Start; entry Wait_Start when Start_Open is begin Start_Open := False; end Wait_Start; end Sporadic_Agent; task body Sporadic is begin S.Initialize_Code; loop A.Wait_Start; S.Sporadic_Code; end loop; end Sporadic; end Sporadics;