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-Thread: 103376,4158e4de0999807a,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!news.agarik.com!teaser.fr!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Date: Mon, 12 Sep 2005 02:02:03 +0200 From: James User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050802 Debian/1.7.10-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: GNAT 4.0 strange behaviour Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4324c57b$0$17248$8fcfb975@news.wanadoo.fr> Organization: les newsgroups par Wanadoo NNTP-Posting-Date: 12 Sep 2005 02:02:03 CEST NNTP-Posting-Host: 83.193.117.157 X-Trace: 1126483323 news.wanadoo.fr 17248 83.193.117.157:32844 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:4579 Date: 2005-09-12T02:02:03+02:00 List-Id: This is a very small program compiled under linux debian with gnat 4 based on gcc 4.0 The output of the program is 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 which is of course not right... If line labelled 1 is removed and replaced by line labelled 2, the output is correct. The output is also correct if part 1 is replaced by part 2. Any advice or place where I could send a bug report? with Text_Io; use Text_Io; with Interfaces; use Interfaces; procedure Toto is type Intboard is new Unsigned_64; for Intboard'Size use 64; type Bit is new Integer range 0..1; for Bit'Size use 1; type Bitboard is array (0..63) of Bit; pragma Pack(Bitboard); for Bitboard'Size use 64; A_B : Bitboard; A_I : Intboard; for A_I'Address use A_B'Address; --label1 -- for A_B'Address use A_I'Address; --label2 begin --part 1 for I in 0 .. 7 loop for J in 0 .. 7 loop A_B(I*8+J) := 1; Put(Bit'Image(A_B(I*8+J))); end loop; end loop; --part 2 -- for I in 0 .. 63 loop -- A_B(I) := 1; -- Put(Bit'Image(A_B(I))); -- end loop; end Toto;