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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.36.66 with SMTP id s2mr14997932qad.6.1369649417034; Mon, 27 May 2013 03:10:17 -0700 (PDT) X-Received: by 10.49.87.232 with SMTP id bb8mr2243047qeb.28.1369649417021; Mon, 27 May 2013 03:10:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!ch1no1326033qab.0!news-out.google.com!y6ni51517qax.0!nntp.google.com!ch1no1326029qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 27 May 2013 03:10:16 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.9; posting-account=l8k8IwoAAADeDydswOzwNzmn10qOk9gt NNTP-Posting-Host: 136.163.203.9 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Expected exception is not thrown in Windows XP, should be a compiler bug? From: ake.ragnar.dahlgren@gmail.com Injection-Date: Mon, 27 May 2013 10:10:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3155 Xref: news.eternal-september.org comp.lang.ada:15653 Date: 2013-05-27T03:10:16-07:00 List-Id: What follows are two code snippets that are nearly identical but completely= different behavior during runtime. Consider the following code: with Ada.Text_IO; with Ada.Strings.Fixed; with GNATCOLL.SQL.Postgres; procedure Main is Host_URL : aliased constant String :=3D "localhosta"; begin declare type Host_URL_Type is new String (1 .. 9); Target_Host_URL : Host_URL_Type; begin Ada.Strings.Fixed.Move (Source =3D> Host_URL, Target =3D> String (Target_Host_URL)); end; exception when others =3D> Ada.Text_IO.Put_Line("Write some error message"); end Main; When compiled under Windows XP, Gnatcoll release 1.5w is used and GNAT PRO = is version .1.0w-20121028 based upon gcc version 4.7.3 one gets the followi= ng output: C:\temp>main This application has requested the Runtime to terminate it in an unusual wa= y. Please contact the application's support team for more information. C:\temp> Now consider the following code: with Ada.Text_IO; with Ada.Strings.Fixed; --with GNATCOLL.SQL.Postgres; procedure Main is Host_URL : aliased constant String :=3D "localhosta"; begin declare type Host_URL_Type is new String (1 .. 9); Target_Host_URL : Host_URL_Type; begin Ada.Strings.Fixed.Move (Source =3D> Host_URL, Target =3D> String (Target_Host_URL)); end; exception when others =3D> Ada.Text_IO.Put_Line("Write some error message"); end Main; It has the expected output: C:\temp>main Write some error message C:\temp> The only difference between the two applications is whether the package GNA= TCOLL.SQL.Postgres is with:ed or not. It is not even used and therefore sho= uld not have any impact on the behavior of the application. I cannot detect= this bug on my Mac OS X computer at home with GNAT Libre installed on it. = Is there anybody else at comp.lang.ada that can detect this bug? Best regards, =C5ke Ragnar Dahlgren