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,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news3.google.com!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!news.supernews.com!nospam From: nospam@see.signature (Richard Maine) Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: Ada vs Fortran for scientific applications Date: Wed, 24 May 2006 23:04:03 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> User-Agent: MacSOUP/2.7 (Mac OS X version 10.4.4) X-Complaints-To: abuse@supernews.com Xref: g2news2.google.com comp.lang.ada:4445 comp.lang.fortran:10231 comp.lang.pl1:1695 Date: 2006-05-24T23:04:03-07:00 List-Id: Nasser Abbasi wrote: > I just did this simple test, declare an array and go overbound and see if we > get a run-time error: ... > $ g95 f.f90 ... > $ <------------------- NO runtime ERROR This part of the thread has started drifting away from relevance to much of anything, but that particular sample is just drifting yet further. It illustrates neither much about subscript bounds rules being part of the language nor about bounds checking being part of the language, which were the two topics mentioned earlier in the subthread. Instead, the example illustrates only that g95 does not have the bounds check option enabled by default, which is yet a third question (and one mentioned in more generality earlier). As with most compilers, g95 does have a bounds check option; it just isn't enabled by default. Compiling your same example, but asking for bounds checking, gets it. In particular, compiling and running your example code on my Mac here with g95 -fbounds-check clf.f90 ./a.out Gives me: At line 4 of file clf.f90 Traceback: not available, compile with -ftrace=frame or -ftrace=full Fortran runtime error: Array element out of bounds: 11 in (1:10), dim=1 which is, in fact, more detailed than the message you showed from gnat. (Turning on the trace options gets rid of the message about not having one, but it is trivial and adds nothing else useful for this example.) -- Richard Maine | Good judgement comes from experience; email: last name at domain . net | experience comes from bad judgement. domain: summertriangle | -- Mark Twain