comp.lang.ada
 help / color / mirror / Atom feed
* Bus error
@ 2007-06-27 14:23 Maciej Sobczak
  2007-06-27 15:45 ` Georg Bauhaus
  2007-06-27 20:02 ` Anh Vo
  0 siblings, 2 replies; 18+ messages in thread
From: Maciej Sobczak @ 2007-06-27 14:23 UTC (permalink / raw)


I have found a problem with my compiler:

-- a.ads
with Ada.Finalization;
package A is

   type T is tagged limited private;

   function Make return T;

private

   type T is new Ada.Finalization.Limited_Controlled with
      record
         X : Integer;
      end record;

   overriding procedure Finalize(V : in out T);

end A;

-- a.adb
with Ada.Text_IO;
package body A is

   function Make return T is
   begin
      return (Ada.Finalization.Limited_Controlled with 7);
   end Make;

   procedure Finalize(V : in out T) is
   begin
      Ada.Text_IO.Put("Finalizing T");
   end;

end A;

-- hello.adb
with A;
procedure Hello is
   Y : A.T := A.Make;
begin
   null;
end Hello;

$ gnatmake hello
gcc -c hello.adb
gcc -c a.adb
gnatbind -x hello.ali
gnatlink hello.ali
$ ./hello
Bus error
$

GNAT version: 4.3.0 20070527 (experimental)

BTW - is the code correct at all? I'm worried about A.Make in
particular.

--
Maciej Sobczak
http://www.msobczak.com/




^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <0367891DA5DA7E408D42A860FA002F44B0CC48@sma2901.cr.eurocopter.corp>]

end of thread, other threads:[~2007-06-30 12:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-27 14:23 Bus error Maciej Sobczak
2007-06-27 15:45 ` Georg Bauhaus
2007-06-27 17:19   ` Maciej Sobczak
2007-06-28  1:58     ` Robert A Duff
2007-06-28 20:06       ` Maciej Sobczak
2007-06-28 21:19         ` Robert A Duff
2007-06-29  8:05           ` Maciej Sobczak
2007-06-29  9:42             ` Georg Bauhaus
2007-06-29 16:59               ` Adam Beneschan
2007-06-30 12:33                 ` Georg Bauhaus
2007-06-30  2:02             ` Robert A Duff
2007-06-29  8:04         ` Dmitry A. Kazakov
2007-06-29  9:23           ` AW: " Grein, Christoph (Fa. ESG)
2007-06-29 10:17             ` Dmitry A. Kazakov
2007-06-27 20:02 ` Anh Vo
2007-06-27 20:48   ` Maciej Sobczak
2007-06-28  2:01     ` Robert A Duff
     [not found] <0367891DA5DA7E408D42A860FA002F44B0CC48@sma2901.cr.eurocopter.corp>
2007-06-29  9:35 ` AW: " Duncan Sands

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