comp.lang.ada
 help / color / mirror / Atom feed
* Problem where a function is invoked once but called twice (when invocation is within an allocator).
@ 2011-05-05  3:52 Rod Kay
  2011-05-05  5:43 ` J-P. Rosen
  0 siblings, 1 reply; 21+ messages in thread
From: Rod Kay @ 2011-05-05  3:52 UTC (permalink / raw)


hi,

   Any clues on why the use of an allocator would cause a single
function invocation to be called twice ?


   the_Movie : media.Video.view := new_Movie;

   the_next_Frame :              openGL.Image :=
the_Movie.next_Frame;                                        -- case 1
   the_next_Frame : access openGL.Image := new
opengl.Image' (the_Movie.next_Frame);   -- case 2

   In the 1st case, the 'next_Frame' function is called once.
   In the 2nd case, it is called twice.


   'the_Movie' is an access to an object of tagged type
'media.Video.item'.

   package media.Video is
      type Item is tagged limited private;
      type View is access all Item;
      ...
      function  next_Frame  (Self : access Item) return opengl.Image;
      ...
   end media.Video;



   'opengl.Image' is an array with two unconstrained indices ...

   package openGL is
      ...
      type Image is array (Index_t range <>, Index_t range <>) of
Color;
   end openGL;



   In case it matters, the 'next_Frame' function contains a rendezvous
with a decoder task.
   The decoder task is a component of the 'media.Video.item' record.



regards,
Rod.



^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Problem where a function is invoked once but called twice (when invocation is within an allocator).
@ 2011-05-14  0:27 Rod Kay
  0 siblings, 0 replies; 21+ messages in thread
From: Rod Kay @ 2011-05-14  0:27 UTC (permalink / raw)


On May 14, 3:40 am, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
>
> I would like this bug report to be public in the GCC bugzilla database;
> for multiple reasons, this is better than for the bug to remain private
> in AdaCore's bug tracking system.  Could someone take the time to file
> it properly in Bugzilla?
>

   Submitted ... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48995

regards.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-05-14  0:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-05  3:52 Problem where a function is invoked once but called twice (when invocation is within an allocator) Rod Kay
2011-05-05  5:43 ` J-P. Rosen
2011-05-05  6:12   ` Rod Kay
2011-05-05  8:22   ` Yannick Duchêne (Hibou57)
2011-05-05 10:59     ` Rod Kay
2011-05-05 17:07       ` Florian Weimer
2011-05-06  0:49         ` Rod Kay
2011-05-06 23:41           ` Anh Vo
2011-05-07  1:38             ` Rod Kay
2011-05-07  9:06               ` Georg Bauhaus
2011-05-07  9:45                 ` Rod Kay
2011-05-09 16:01               ` Anh Vo
2011-05-09 23:00                 ` Dan
2011-05-10  0:14                   ` Anh Vo
2011-05-10  0:24                     ` Rod Kay
2011-05-10  0:55                       ` Anh Vo
2011-05-11 17:23                         ` Dan
2011-05-12 22:35                         ` Rod Kay
2011-05-13 17:40                           ` Ludovic Brenta
2011-05-10  0:21                   ` Rod Kay
  -- strict thread matches above, loose matches on Subject: below --
2011-05-14  0:27 Rod Kay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox