From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7001494ace46eea7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-18 10:16:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!newsspool1.bredband.com!news2.bredband.com.POSTED!not-for-mail From: "Per Sandbergs" Newsgroups: comp.lang.ada References: Subject: Re: Overriding discriminants perplexes GNAT 3.14p X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <4y2i9.12631$3c.2846@news2.bredband.com> Date: Wed, 18 Sep 2002 19:17:24 +0200 NNTP-Posting-Host: 213.114.165.252 X-Complaints-To: news-abuse@bredband.com X-Trace: news2.bredband.com 1032369408 213.114.165.252 (Wed, 18 Sep 2002 19:16:48 CEST) NNTP-Posting-Date: Wed, 18 Sep 2002 19:16:48 CEST Organization: A customer of B2 Bredbandsbolaget (www.bredband.com) Xref: archiver1.google.com comp.lang.ada:29120 Date: 2002-09-18T19:17:24+02:00 List-Id: 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" 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