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,13ab88b30e0f779d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-28 09:35:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed.wxs.nl!amsnews01.chello.com!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-binary.blueyonder.co.uk.POSTED!53ab2750!not-for-mail User-Agent: Microsoft-Entourage/10.1.1.2418 Subject: Re: Efficient Matrix? From: Bill Findlay Newsgroups: comp.lang.ada Message-ID: References: <3e0b2a66_4@news.bluewin.ch> Mime-version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Date: Sat, 28 Dec 2002 17:35:43 +0000 NNTP-Posting-Host: 80.195.52.70 X-Complaints-To: abuse@blueyonder.co.uk X-Trace: news-binary.blueyonder.co.uk 1041096957 80.195.52.70 (Sat, 28 Dec 2002 17:35:57 GMT) NNTP-Posting-Date: Sat, 28 Dec 2002 17:35:57 GMT Organization: blueyonder (post doesn't reflect views of blueyonder) Xref: archiver1.google.com comp.lang.ada:32364 Date: 2002-12-28T17:35:43+00:00 List-Id: On 28/12/02 17:25, in article BA338F12.1700%yaldnifw@blueyonder.co.uk, "Bill Findlay" wrote: > procedure bla is > > type unconstrained_type is > array (Positive range <>, Positive range <>) of Boolean; > for unconstrained_type'Component_Size use 1; > pragma Pack (unconstrained_type); > type unconstrained_type_ptr is access unconstrained_type; > > subtype constrained_type is unconstrained_type (1 .. 1000, 1 .. 500); > type constrained_type_ptr is access constrained_type; > > C : constrained_type_ptr := new constrained_type; > U : unconstrained_type_ptr := new unconstrained_type > (1 .. 1000, 1 .. 500); > ... Well I had a closer look and found this: li r6,0 ori r3,r6,62500 ^^^^^ = 1000*500 / 8 bl L___gnat_malloc$stub stw r3,1556(r1) li r7,0 ori r3,r7,62516 ^^^^^ = 1000*500 / 8 + 16 (for dope vector?) bl L___gnat_malloc$stub ... So it looks as though the component size and packing are honoured, but the attributes are lying about it -- Bill-Findlay chez blue-yonder.co.uk ("-" => "")