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 X-Google-Thread: 103376,23d2475711dc99b8,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-10 19:18:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: A bug in Gnat, or in my code? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: Date: Thu, 11 Mar 2004 03:18:14 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1078975094 217.209.116.179 (Thu, 11 Mar 2004 04:18:14 CET) NNTP-Posting-Date: Thu, 11 Mar 2004 04:18:14 CET Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:6224 Date: 2004-03-11T03:18:14+00:00 List-Id: This program, when compiled with Gnat 3.3.2 and run on Fedora Core 1,=20 raises Storage_Error on line 7 (because of a segmentation fault): procedure Error is -- 1 -- 2 procedure Proc (NullS : String) is -- 3 type SA is access String; -- 4 Point : SA :=3D new String (1 .. 0); -- 5 begin -- 6 Point.all :=3D NullS; -- 7 end Proc; -- 8 -- 9 S : String :=3D "s"; -- 10 begin -- 11 Proc(S(3 .. 1)); -- 12 end Error; -- 13 If I change 3 to 2 on line 12 there is no error. As far as I can see,=20 (3..1) should be as legal as (2..1). Am I right that this is a bug in Gnat? --=20 Bj=F6rn Persson jor ers @sv ge. b n_p son eri nu