comp.lang.ada
 help / color / mirror / Atom feed
From: "Per Sandbergs" <prsa@cntw.com>
Subject: Re: Overriding discriminants perplexes GNAT 3.14p
Date: Wed, 18 Sep 2002 19:17:24 +0200
Date: 2002-09-18T19:17:24+02:00	[thread overview]
Message-ID: <4y2i9.12631$3c.2846@news2.bredband.com> (raw)
In-Reply-To: ama2bm$404hu$1@ID-77047.news.dfncis.de

I am using GNAT(pro) and when ever i got som problems or questions with  i
send it to ACT (the GNAT people).
And the are real fast in solving our problems (We pay them for that).

So my advice to you would be:
    Report the bug in acordance with the crash printout so that other users
may benefit from your findings.

/Regards
/Per Sandberg

"Dmitry A.Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:ama2bm$404hu$1@ID-77047.news.dfncis.de...
> Hi!
>
> The following primitive code causes "GNAT bug detected" report:
> --------
> with Ada.Finalization; use Ada.Finalization;
>
> package Test1 is
>    type X (N : Natural) is
>       new Ada.Finalization.Limited_Controlled with private;
>    procedure Initialize (Obj : in out X);
> private
>    type X (N : Natural) is
>       new Ada.Finalization.Limited_Controlled with
>    record
>       NS : String (1..N);
>    end record;
> end Test1;
> ----------
> package body Test1 is
>    procedure Initialize (Obj : in out X) is
>    begin
>       null;
>    end Initialize;
> end Test1;
> ----------
> package Test1.Test2 is
>    type XX (M : Natural; N : Natural)  is new X with private;
>    procedure Initialize (Obj : in out XX);
> private
>    type XX (M : Natural; N : Natural)  is new X (N) with
>    record
>       MS : String (1..M);
>    end record;
> end Test1.Test2;
> ----------
> package body Test1.Test2 is
>    procedure Initialize (Obj : in out XX) is
>    begin
>       Initialize (X (Obj));
>    end Initialize;
> end Test1.Test2;
> ----------
> package Test1.Test2.Test3 is
>    type XXX is new XX (10, 20) with private;
>    procedure Initialize (Obj : in out XXX);
> private
>    type XXX is new XX (10, 20) with null record;
> end Test1.Test2.Test3;
> ----------
> package body Test1.Test2.Test3 is
>    procedure Initialize (Obj : in out XXX) is
>    begin
>       Initialize (XX (Obj));
>    end Initialize;
> end Test1.Test2.Test3;
> ----------
> 1. Unconstrained type X has a discriminant
> 2. Unconstrained XX (derived from X) has two disriminants. It overrides
the
> discriminant of X
> 3. Constrained XXX is derived from XX.
>
> This results in a bug report (crash)  under Windows.
>
> What wonders me is which sort of validation uses ACT if such bugs go
> through? People rightly criticize MS VC++, but the situation with Ada
> compilers isn't much better. I judge from my experience with GNAT and
> Object Ada. It is a permanent battle of finding work-arounds for countless
> compiler bugs. Is there any good Ada compilers since DEC gone?
>
> --
> Regards,
> Dmitry Kazakov
> www.dmitry-kazakov.de





  parent reply	other threads:[~2002-09-18 17:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-19  2:32 Overriding discriminants perplexes GNAT 3.14p Dmitry A.Kazakov
2002-09-18 16:45 ` Stephen Leake
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 15:51     ` Stephen Leake
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 12:29         ` Stephen Leake
2002-09-22  8:43           ` Dmitry A.Kazakov
2002-09-22 13:32             ` Georg Bauhaus
2002-09-23  5:41               ` Dmitry A.Kazakov
2002-09-23 12:41                 ` Georg Bauhaus
2002-09-24  1:38                   ` Dmitry A.Kazakov
2002-09-23 15:33             ` Stephen Leake
2002-09-24  8:35               ` Dmitry A. Kazakov
2002-09-19 18:22     ` Adam Beneschan
2002-09-20 22:06       ` Dmitry A.Kazakov
2002-09-20 16:00         ` Adam Beneschan
2002-09-22  8:43           ` Dmitry A.Kazakov
2002-09-23 21:18             ` Adam Beneschan
2002-09-24  9:40               ` Dmitry A. Kazakov
2002-09-21 13:01     ` Simon Wright
2002-09-18 16:46 ` Mark Johnson
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-19 16:17     ` Stephen Leake
2002-09-19 20:02       ` tmoran
2002-09-20 21:10       ` Dmitry A.Kazakov
2002-09-21 12:56       ` Simon Wright
2002-09-18 16:49 ` Frank J. Lhota
2002-09-19 21:34   ` Dmitry A.Kazakov
2002-09-18 17:17 ` Per Sandbergs [this message]
2002-09-19  8:51 ` Thierry Lelegard
  -- strict thread matches above, loose matches on Subject: below --
2002-09-19  9:08 Grein, Christoph
replies disabled

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