Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!ucdavis!iris!hildum From: hildum@iris.ucdavis.edu (Eric Hildum) Newsgroups: comp.os.vms Subject: VMS C version 2.3 optimize bug? Message-ID: <2101@ucdavis.ucdavis.edu> Date: 27 May 88 22:09:25 GMT References: <2099@ucdavis.ucdavis.edu> Sender: uucp@ucdavis.ucdavis.edu Reply-To: hildum@iris.ucdavis.edu (Eric Hildum) Organization: U.C. Davis - College of Engineering Lines: 22 Hello. I am current using VAX/VMS C version 2.3-024. Several of my programs dynamically allocate space which is later referenced using array reference syntax (eg, in a partial sketch: the variable is declared "double ****temp[3]" and later referenced with "temp[index][f][b][y][x]", after having been set to point at arrays of properly declared pointers). I have no trouble when I compile the programs /NOOPTIMIZE, but get access violations when I compile /OPTIMIZE. The only time I have noticed the problem is when I reference the (declared) array in a loop where the loop variable is used as the index (ie, "index" in the above example). Apparently the optimizer attempts to optimize the loop index - and screws up. Is there a later version of C that I can get, and is this a known problem - or should I submit an SPR? Thank you, Eric Hildum dehildum@ucdavis.ucdavis.edu (Internet) dehildum@ucdavis.bitnet (BITNET) ucbvax!ucdavis!dehildum (uucp)