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,4eca860272d4832b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!news2.arglkargh.de!news.n-ix.net!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Static vs dynamic evaluation anomaly? From: Georg Bauhaus In-Reply-To: <87d54mguco.fsf@ludovic-brenta.org> References: <12shen4qjhv41a7@corp.supernews.com> <1170792077.235994.10900@q2g2000cwa.googlegroups.com> <87d54mguco.fsf@ludovic-brenta.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1170843700.7656.47.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Date: Wed, 07 Feb 2007 11:21:40 +0100 NNTP-Posting-Date: 07 Feb 2007 11:21:27 CET NNTP-Posting-Host: c96feed2.newsspool3.arcor-online.net X-Trace: DXC=T^0[>jlK2>IgHGdMcF=Q^Z^V3h4Fo<]lROoRagUcjd<3m<;b^@^?JcUT=diPCY\c7>ejVhQ1DQM4S7CC`[]Nc2 On Wed, 2007-02-07 at 11:00 +0100, Ludovic Brenta wrote: > Steve writes: > > Adam Beneschanwrote > >> On Feb 6, 9:29 am, Matt Jaffe wrote: > >> > >> The following program produces incorrect results on GNAT, or at least > >> on the version I'm using: > >> > >> with Ada.Text_IO; > >... > >> end test271; > >> > > > > One more data point... ObjectAda 7.2.2 gives the result: > > > > When J= 0, X*2**J = 31 > > When J= 1, X*2**J = 62 > > When J= 2, X*2**J = 60 > > When J= 3, X*2**J = 56 > > When J= 4, X*2**J = 48 > > When J= 5, X*2**J = 32 > > > > Which I believe is correct, > > Regards, > > > Actually I'll take back what I said earlier. With Debian gnat > 4.1.1-22 I also get these seemingly correct results. It seems to depend on a compiler switch, could you try $ gnatmake -gnatp -s test271 $ gnatmake -gnato -s test271 -- Georg