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,49eb370bfd3baa90 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news-out.ntli.net!newsrout1-gui.ntli.net!ntli.net!newsfe3-gui.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Memory limits in Ada where Fortran has none User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: <1110070479.250902.220540@l41g2000cwc.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 08 Mar 2005 11:24:42 GMT NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe3-gui.ntli.net 1110281082 81.100.88.147 (Tue, 08 Mar 2005 11:24:42 GMT) NNTP-Posting-Date: Tue, 08 Mar 2005 11:24:42 GMT Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:8847 Date: 2005-03-08T11:24:42+00:00 List-Id: On Sun, 06 Mar 2005 19:05:21 -0500, Robert A Duff wrote: > The following works for me: > > package Test_Pkg is > X: array (1..400_000_000) of Integer := (others => 999); > end Test_Pkg; > > with Test_Pkg; use Test_Pkg; > with Text_IO; use Text_IO; > procedure Test is > begin > Put_Line(Integer'Image(X(X'Last))); > end Test; I am very wary of a test like this because GNAT sometimes silently accesses the wrong element of very large data, if I remember correctly. A correctly written program can (and did!) thus fail catastrophically. Large records in particular are suspect (on GNAT 3.15p, x86). (I have no test case to hand at the moment). I don't know if it is affected by -gnato and default absence of overflow checking. A more comforting test would place a *different* value at each location, and check they are all correct! -- Dr. Adrian Wrigley, Cambridge, UK.