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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ff3e0c57fc4cfad,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr14453123pbc.0.1341611754289; Fri, 06 Jul 2012 14:55:54 -0700 (PDT) Path: l9ni11004pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Charly Newsgroups: comp.lang.ada Subject: strange error in tiny ada 2012 program Date: Fri, 6 Jul 2012 14:55:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 91.34.74.3 Mime-Version: 1.0 X-Trace: posting.google.com 1341611754 7113 127.0.0.1 (6 Jul 2012 21:55:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 6 Jul 2012 21:55:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.34.74.3; posting-account=5zx--goAAAD06H29EnWQGKTO-gctuXHl User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-07-06T14:55:53-07:00 List-Id: Hi all I installed the new GNAT GPL 2012 and started playing with the new Synchronized_Queue Containers. Unfortunately I got serverall problems, which can be shown in the following tiny test program 1 with Ada.Containers.Synchronized_Queue_Interfaces; 2 with Ada.Containers.Bounded_Synchronized_Queues; 3 with Ada.Text_IO; 4 5 procedure Ctest is 6 7 8 package Integer_Queue_Interfaces is 9 new Ada.Containers.Synchronized_Queue_Interfaces (Integer); 10 11 package Integer_Queues is 12 new Ada.Containers.Bounded_Synchronized_Queues (Integer_Queue_Interfaces, 10); 13 14 subtype Integer_Queue_Type is Integer_Queues.Queue; 15 16 -- type New_Integer_Queue_Type is new Integer_Queue_Type with null record; 17 18 type Integer_Queue_Record is tagged limited record 19 Queue : Integer_Queue_Type; 20 end record; 21 22 --Integer_Queue1 : Integer_Queue_Type; 23 Integer_Queue2 : Integer_Queue_Record; 24 25 begin 26 27 Ada.Text_IO.Put_Line ("Hello Ada"); 28 29 end Ctest; First problem occured in line 16 where I want to extend the Integer_Queue_Type but I got an error message: ctest.adb:16:04: parent type of a record extension cannot be a synchronized tagged type (RM 3.9.1 (3/1)) So I removed the statement and defined a new tagged type with the Integer_Queue_Type as record element in lines 18 - 20. This variant compiles without messages but now I get an exception STORAGE_ERROR. addr2line locates the error in line 5 what isn't very usefull. By trial and error I found, that the error comes from line 23, when I replace it with line 22 the program 'works'. So my questions are: Did I make any mistake in this tiny program or is it a bug in the new GNAT version? How can a extend a proteced type (line 16). Thanks