Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!versatc!mips!synthesis!len From: len@synthesis.Synthesis.COM (Len Lattanzi) Newsgroups: comp.sys.sgi Subject: Re: Bug on IRIX 4d 3.1 when -02 level optimizer used. Message-ID: <20811@mips.mips.COM> Date: 31 May 89 22:51:21 GMT References: <8905261424.aa06578@VGR.BRL.MIL> Sender: news@mips.COM Reply-To: len@synthesis.synthesis.com (Len Lattanzi) Organization: Synthesis Software Solutions Inc, Sunnyvale, CA Lines: 16 In article <8905261424.aa06578@VGR.BRL.MIL> gwyn@BRL.MIL (Doug Gwyn, VLD/VMB) writes: :Actually, it is just after args[1] received a pointer to "2" that :the first for-loop terminates prematurely. strtok() definitely :returned "2" and that was definitely stored into args[1], but the :first for-loop failed to keep looping for what should have been :another two calls to strtok(). This seems to be a bug in the 1.31 as1 (instruction reorganizer). Version 2.0 works the same as the '-g' version. What seems to happening is that i++ of the for-loop is moved before args[i] = strtok() without changing the reference to args[i-1]. -Len Len Lattanzi (len@Synthesis.com) <{ames,pyramid,decwrl}!mips!synthesis!len> Synthesis Software Solutions, Inc. The RISC Software Company I would have put a disclaimer here but I already posted the article.