* Access to procedure causes Program_Error
@ 1998-07-30 0:00 aaward
0 siblings, 0 replies; only message in thread
From: aaward @ 1998-07-30 0:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-07-30 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-30 0:00 Access to procedure causes Program_Error aaward
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox