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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.70.18.37 with SMTP id t5mr14256847pdd.7.1425065186674; Fri, 27 Feb 2015 11:26:26 -0800 (PST) X-Received: by 10.140.83.165 with SMTP id j34mr232636qgd.8.1425065186402; Fri, 27 Feb 2015 11:26:26 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!hl2no34363846igb.0!news-out.google.com!c1ni203qar.1!nntp.google.com!i13no9424218qae.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 27 Feb 2015 11:26:26 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=163.1.79.34; posting-account=HEyy0wkAAAAHt7XrIZ0vzuSQk4Xn4JUS NNTP-Posting-Host: 163.1.79.34 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: "STORAGE_ERROR : s-intman.adb:139 explicit raise" from record containing a queue from Ada.Containers.Bounded_Synchronized_Queues in Gnat Ada 2014 From: jocpaine@googlemail.com Injection-Date: Fri, 27 Feb 2015 19:26:26 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:25061 Date: 2015-02-27T11:26:26-08:00 List-Id: Hi. I've defined a queue type by instantiating Ada.Containers.Bounded_Synch= ronized_Queues . When I define a record with a field of that type, and then= declare a variable of the record type, I get the storage error mentioned i= n the email subject line. That happens even if I never use the variable. Ho= wever, if my variable is the queue type, I don't get the error. I'm surpris= ed at that, because I'd expect a one-field record to have exactly the same = storage layout as its field, so if one provokes the error, so should the ot= her. That aside though, can anyone suggest a fix?=20 Google shows me that similar errors have been reported before (not with the= queue types): for example https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D4= 2816 , "Bug 42816 - Crash in Ada.Containers.Vectors.Update_Element". I'm using Gnat Ada 2014: specifically, gnatmake GPL 2014 (20140331) on Ubun= tu 14.10 on version 3.16.0-30-generic of the Linux kernel. My program is be= low. I compiled it by doing gnatmake q11 from the file q11.adb . Running it by doing ./q11 gives the error. Here's the program: with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Containers.Bounded_Synchronized_Queues; procedure Q11 is package Job_Queues_Interface is new Ada.Containers.Synchronized_Queue_Interfaces ( Element_Type =3D> Integer ); package Job_Queues_Package is new Ada.Containers.Bounded_Synchronized_Queues ( Queue_Interfaces =3D> Job_Queues_Interface , Default_Capacity =3D> 100=20 ); subtype My_Queue_Type is Job_Queues_Package.Queue;=20 =20 type Job_Queue is record Queue: My_Queue_Type; end record; =20 q : Job_Queue; -- This is the line causing the error. If I give q -- My_Queue_Type instead, the error doesn't happen. =09 begin NULL; end; Thanks Jocelyn Ireson-Paine www.j-paine.org www.jocelyns-cartoons.uk