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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b024c46340041773,start X-Google-Attributes: gid103376,public From: aaward@my-dejanews.com Subject: Access to procedure causes Program_Error Date: 1998/07/30 Message-ID: <6pqn39$ir$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 376428540 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Jul 30 21:03:36 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I ;Nav) Date: 1998-07-30T00:00:00+00:00 List-Id: I'm using GNAT 3.10p on NT 4.0 and have this little oddity I need some help with: I'm working on a project where an access to procedure is passed to one procedure, which in turn passes it to a second procedure for use. This scheme works fine when GNAT is run without optimizations, however when using -O3 it causes a Program_Error when the second procedure tries to call the access to procedure. At -O1 it appears to hang; I'm not sure what happens, but it's off in la-la land. Has anyone else encountered this behavior, or am I on to something in GNAT? Some code snippets for your inspection... other parameters and code omitted. procedure Run_Forecast ( Allocation_Callback : Allocation_Status_Callback := Null_Allocation_Callback'access; ) is begin -- ... Do_Allocation(Allocation_Callback); -- ... end Run_Forecast; procedure Do_Allocation ( Status_Callback : in Allocation_Status_Callback ) is begin -- ... Status_Callback (Iteration, Forecast.Data, Constraint); -- ... end Do_Allocation; The -O3 Program_Error occurs at the call to Status_Callback, but works fine without optimization. Any clues are appreciated... -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum