2 -- { dg-options "-O3" }
4 with Ada
.Unchecked_Deallocation
;
9 is new Ada
.Unchecked_Deallocation
(Queue_Element
, A_Queue_Element
);
11 procedure Copy
(dest
: in out Queue
; src
: Queue
) is
12 d
, s
, pd
, ps
, t
: A_Queue_Element
;
17 while d
/= null and s
/= null loop
24 if src
.sz
= dest
.sz
then
33 dest
.back
.next
:= null;
36 dest
.front
:= new Queue_Element
;
37 dest
.front
.value
:= s
.value
;
42 pd
.next
:= new Queue_Element
;
43 pd
.next
.value
:= s
.value
;