From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Sat, 15 Jul 2006 06:22:52 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] An acid-question In-Reply-To: <466b269ce739adc433673872f2a17422@mail.gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 809a3abc-ead1-11e9-9d60-3106f5b1d025 i doesn't exist -- it was optimized away because your code is equivalent to this void m00(...) { int i; if(foo){ for(i = 0; i <= n; i++){ some_data[i] = srcdata[i] } } else { ... } } because i == j. - erik On Sat Jul 15 05:55:56 CDT 2006, sretzki@gmx.de wrote: > > Hi folks, > > I got a function which goes like this: > void > m00(...) > { > int i,j = 0; > > if(foo) { > > for(i=0;i<=n;i++) { > some_data[j++] = srcdata[i] > } > > } else { > ... > } > } > > (ignore the errors) > > I get a fault write. Jippie. Starting to acid arround, I came across this: > > acid: *m00:j > 0x00000000 > acid: *m00:i > :3: (error) colon: local variable not found > acid: > > so obviously acid does not 'see' i because it is first used in a new block (the if()), at least I guess so. How do I display the value of i in acid? > > > Mfg, Sascha