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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,b8a1363302988cfe X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!27g2000yqr.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: GNAT GPL 2009 for Mac OS X (Snow Leopard) Date: Wed, 23 Dec 2009 06:26:49 -0800 (PST) Organization: http://groups.google.com Message-ID: <68e6e09a-9f02-4fd4-a87c-d1c43dd104e1@27g2000yqr.googlegroups.com> References: <5b0bf629-0935-414d-9a57-1757632840b8@d10g2000yqh.googlegroups.com> <96854a61-2032-49b1-a8b2-8a5aee181701@22g2000yqr.googlegroups.com> NNTP-Posting-Host: 82.30.110.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1261578409 10870 127.0.0.1 (23 Dec 2009 14:26:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 23 Dec 2009 14:26:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 27g2000yqr.googlegroups.com; posting-host=82.30.110.254; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8499 Date: 2009-12-23T06:26:49-08:00 List-Id: On Dec 23, 3:29=A0am, "(see below)" wrote: > On 22/12/2009 23:37, in article > 96854a61-2032-49b1-a8b2-8a5aee181...@22g2000yqr.googlegroups.com, "sjw" > > wrote: > > Have just uploaded gnat-gpl-2009-i386-apple-darwin10.2.0-1.tar.bz2, > > without the dependency; will remove the offending files after a day or > > two. > > Unfortunately, it goes very badly wrong at -O1 optimization level on anot= her > example: > > -------------------------------------------------------------------------= -- - > package test is > =A0 =A0type i64 is mod 2**64; > =A0 =A0for =A0i64'Size use 64; > =A0 =A0subtype a_virtual_address is i64; > =A0 =A0subtype an_offset is a_virtual_address; > > =A0 =A0function fetch_byte_from ( > =A0 =A0 =A0 =A0 =A0location : i64; > =A0 =A0 =A0 =A0 =A0position : an_offset ) > =A0 =A0return i64; > end test; > -- > package body test is > =A0 =A0type i08 is mod 2**8; > =A0 =A0for =A0i08'Size use 8; > =A0 =A0type an_i08_array is array (a_virtual_address range <>) of i08; > =A0 =A0for =A0an_i08_array'Component_Size use i08'Size; > =A0 =A0type an_i08_group is new an_i08_array (0..7); > =A0 =A0for =A0an_i08_group'Size use i64'Size; > =A0 =A0pragma Convention (C, an_i08_group); > > =A0 =A0function fetch_byte_from ( > =A0 =A0 =A0 =A0 =A0location : i64; > =A0 =A0 =A0 =A0 =A0position : an_offset ) > =A0 =A0return i64 is > =A0 =A0 =A0 the_location_as_i08s : an_i08_group; > =A0 =A0 =A0 for the_location_as_i08s'Address use location'Address; > =A0 =A0 =A0 pragma Import (Ada, the_location_as_i08s); > =A0 =A0begin > =A0 =A0 =A0 return i64(the_location_as_i08s > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ((position and 2#111#) xor 2#111#)); > =A0 =A0end fetch_byte_from; > end test; > -------------------------------------------------------------------------= -- - > > thus: > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3DGNAT BUG DETECTED=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > | GPL 2009 (20090519) (i386-apple-darwin10.2.0) GCC error: =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 | > | in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:312 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 | > | Error detected at test.adb:14:7 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| > ... > > This error message does not appear at -O3, but the generated object progr= am > is non-functional, although that may be for a different reason, of course= . > > This code compiled and ran correctly under the Leopard compilers I was us= ing > until I stupidly installed SL. > > What on earth has happened for GNAT to regress so badly in the face of wh= at > is often described as a tidying-up and performance release of OS X? I don't know either, because here it compiles without complaint at -O {0,1,2,3}!