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,5b9a38a75a50e726 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder2.ecngs.de!ecngs!feeder.ecngs.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!newsfeed2.funet.fi!newsfeeds.funet.fi!bowmore.utu.fi!news.cc.tut.fi!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: Feature or Bug? 2#1111# shifted by 4 is 224 Date: Wed, 4 Jun 2008 06:36:24 +0300 Message-ID: <20080604063624.7f1ad6c7.tero.koskinen@iki.fi> References: <20080602191145.1b75b1ee.tero.koskinen@iki.fi> <873anvk9a2.fsf@ludovic-brenta.org> NNTP-Posting-Host: ip154.otanner14.opintanner.fi Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.cc.tut.fi 1212550584 7494 195.148.53.154 (4 Jun 2008 03:36:24 GMT) X-Complaints-To: abuse@tut.fi NNTP-Posting-Date: Wed, 4 Jun 2008 03:36:24 +0000 (UTC) X-Newsreader: Sylpheed 2.4.5 (GTK+ 2.12.7; i386-unknown-openbsd4.3) Xref: g2news1.google.com comp.lang.ada:554 Date: 2008-06-04T06:36:24+03:00 List-Id: On Mon, 02 Jun 2008 19:59:33 +0200 Ludovic Brenta wrote: > Tero Koskinen writes: > > On Mon, 02 Jun 2008 17:17:19 +0200 Dennis Hoppe wrote: > >> In Example B, we limit the parameter N to Positive, because we do not > >> want "negative" shifts. The result of Shift_Left(2#1111#, 4) is 224 > >> (2#11100000#) ! > > > > type Modular_Type is mod 2**4; > > function Shift_Left (Item : in Modular_Type; > > N : in Positive) return Modular_Type is > > begin > > return Item * (2**N); > > end Shift_Left; > > This looks like http://gcc.gnu.org/PR30740 which is fixed in Debian > unstable :) > > Could you confirm that this is the same bug indeed? Applying org.debian.gcc-4.3/debian/patches/pr30740.dpatch (from ada-france.org server) solves the problem for me (GCC 4.3.0, OpenBSD/i386 as earlier). On Solaris the compiler used -gnato and -fstack-check flags by default, so the bug didn't occur there. -- Tero Koskinen - http://iki.fi/tero.koskinen/