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-7-bit X-Google-Thread: 103376,ed23aab45a548fd6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-21 05:55:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Errornous String instantiation Date: Mon, 21 Jul 2003 12:55:17 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1058792117 19874 217.17.192.37 (21 Jul 2003 12:55:17 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 21 Jul 2003 12:55:17 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:40552 Date: 2003-07-21T12:55:17+00:00 List-Id: * Lutz Donnerhacke wrote: > * Preben Randhol wrote: >> Do you have a sample program so I can just gnatchop and run gnatmake I >> can test it for you one gcc 3.3 if you like. > > [private test under way, expect reports soon] gcc 3.3 -O0: Start Elaborating Testing Len 1 20 Testing Len 2 4 Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 <-- Wrong: "k7 : String renames k6;" Testing Len 1 20 Testing Len 2 112 <-- Modified bounds as described in the top posting Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 <-- Wrong: "k7 : String renames k6;" gcc 3.3 -O2: Start Elaborating Testing Len 1 20 Testing Len 2 0 <-- Modified bounds before first access Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 <-- Testing Len 1 20 Testing Len 2 0 <-- Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 <-- Gnat 3.14p -O0 and -O2: Testing Len 1 20 Testing Len 2 4 Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 <-- Wrong: "k7 : String renames k6;" Testing Len 1 20 Testing Len 2 4 Testing Len 3 20 Testing Len 4 25 Testing Len 5 20 Testing Len 6 80 Testing Len 7 1 Otherwise, it looks stable (besides it fails the regression tests). Those tests are successful, when run after elaboration. In order to ease debugging, I provide a snapshot of the program at: ftp://ftp.iks-jena.de/pub/mitarb/lutz/ada/compilerbug.tgz