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 Path: g2news1.google.com!news1.google.com!postnews.google.com!j19g2000yqk.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Problem with streams using 64-bit compiler Date: Mon, 4 Jan 2010 15:09:25 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <2330c1ab-7a97-4b1f-a92a-f20c15501101@b2g2000yqi.googlegroups.com> NNTP-Posting-Host: 94.108.165.166 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1262646565 4277 127.0.0.1 (4 Jan 2010 23:09:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 4 Jan 2010 23:09:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j19g2000yqk.googlegroups.com; posting-host=94.108.165.166; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091123 Iceweasel/3.5.6 (like Firefox/3.5.6; Debian-3.5.6-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8602 Date: 2010-01-04T15:09:25-08:00 List-Id: On Jan 4, 11:46=A0pm, sjw wrote: > While trying to build a 64-bit compiler for Mac OS X Snow Leopard, I > came across this undesirable behaviour: if the program (see end) is > compiled in 32-bit mode or in 64-bit mode with -O0 it works fine, > output is as expected: > > $ ./streamy > =A01234 > 'z' > =A04.32100E-01 > =A04.32100E-01 > > If compiled in 64-bit mode with -O2, output is > > $ ./streamy > 1234 > NUL > =A00.00000E+00 > =A00.00000E+00 > > This is a readback problem, the data file has the same content in all > cases. > > Can anyone with access to an x86_64 compiler (Mac OS X Leopard, or a > Linux, 4.4+) have a try and see what happens? [...] I get the same behavior as you on Debian: gnat-4.4_4.4.2-5_amd64.deb: -O0 OK -O1 bug -O2 bug gnat-4.4_4.4.2-5_i386.deb: -O0 OK -O1 OK -O2 OK This version of GNAT is taken from the FSF's gcc-4_4-branch on 2009-12-28 so is very recent. I suggest you report the bug to http://gcc.gnu.org/bugzilla. Since you've got a perfect reproducer test case, the bug should be easy enough to fix. Maybe someone else can try GCC 4.5? -- Ludovic Brenta.