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.129.85.77 with SMTP id j74mr27030041ywb.55.1436521584129; Fri, 10 Jul 2015 02:46:24 -0700 (PDT) X-Received: by 10.50.43.194 with SMTP id y2mr27960igl.4.1436521584082; Fri, 10 Jul 2015 02:46:24 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!z61no71798qge.0!news-out.google.com!a16ni13778ign.0!nntp.google.com!qs7no3379735igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 10 Jul 2015 02:46:23 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=118.93.184.33; posting-account=g6PEmwoAAADhFsmVm6Epjviaw4MLU0b5 NNTP-Posting-Host: 118.93.184.33 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Possible bug? From: Anatoly Chernyshev Injection-Date: Fri, 10 Jul 2015 09:46:24 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26736 Date: 2015-07-10T02:46:23-07:00 List-Id: Hello everyone, Here is a tiny program compiled in GNAT 2015, under Win 7: procedure fail_arr is n_d,n_f: constant integer:=3D10; type tss is array (1..n_d,1..n_f) of float; tser:tss:=3D(others=3D>(0.0,0.0)); begin for i in tser'range(1) loop for j in tser'range(2) loop tser(i,j):=3D0.0; end loop; end loop; end fail_arr; >From my understanding, in the declaration of tser, its first two columns mu= st be populated with 0.0, and the rest is to be left uninitialized. But und= er no circumstances shall the array to have dimensions (n_d, 2). But that's= exactly what happens in the program. The compiler even gives me nice soft warning about this: 4:11 warning: too few elements for type "tss" defined at line 3 4:11 warning: "Constraint_Error" will be raised at run time Even though it should abort the compilation with an error message. No?