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-Attributes: gid103376,gid1094ba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!sn-xt-sjc-04!sn-xt-sjc-09!sn-post-02!sn-post-sjc-01!supernews.com!news.supernews.com!nospam From: nospam@see.signature (Richard Maine) Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Bounds Check Overhead Date: Fri, 26 May 2006 13:41:21 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <1hfy5wf.m7n5z66jf798N%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> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <4475DA61.3080001@comcast.net> <44762F55.4050106@cits1.stanford.edu> <87hd3d1472.fsf@ludovic-brenta.org> <1hfxsjh.t88mchrssv9cN%nospam@see.signature> <88ydnd5tT58L-erZRVn-pg@comcast.com> 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:4522 comp.lang.fortran:10322 Date: 2006-05-26T13:41:21-07:00 List-Id: glen herrmannsfeldt wrote: > Richard Maine wrote: > > > Likewise almost all compilers have the capability of detecting > > most array bounds violations. That one tends to be mostly done at > > run-time (some simple cases are caught at compile-time, but that's not > > the usual cases), > > I was not so long ago working on a Fortran program with the ever popular > dimension (1) assumed size arrays. (I believe it was written in 1990.) > It seems the IBM XLF compiler, even with runtime bounds checking off, > does compile time bounds checking. A constant subscript of 2 is not > allowed with an assumed size array dimensioned (1). That's exactly one of the simple cases I was talking about that are sometimes caught. I've run into that one with old code. Might have even been the same code, as I ran into it with a fairly widely used free library code (perhaps fftpack, though I'm not sure of that). I was using a different compiler though. -- Richard Maine | Good judgement comes from experience; email: last name at domain . net | experience comes from bad judgement. domain: summertriangle | -- Mark Twain