Re: Function parameter debug info at -O0

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 4:54 AM, Senthil Kumar Selvaraj wrote: > On Mon, Aug 06, 2012 at 01:40:57PM -0400, Frank Ch. Eigler wrote: >> Senthil Kumar Selvaraj writes: >> >> > [...] >> > The following program, when compiled with -O0 -g3 (x86_64 target, but >> > doesn't seem to matter), shows wrong va

Re: Function parameter debug info at -O0

2012-08-06 Thread Senthil Kumar Selvaraj
On Mon, Aug 06, 2012 at 01:40:57PM -0400, Frank Ch. Eigler wrote: > Senthil Kumar Selvaraj writes: > > > [...] > > The following program, when compiled with -O0 -g3 (x86_64 target, but > > doesn't seem to matter), shows wrong values for p (function parameter) > > when debugging. [...] > > This s

Re: Function parameter debug info at -O0

2012-08-06 Thread Frank Ch. Eigler
Senthil Kumar Selvaraj writes: > [...] > The following program, when compiled with -O0 -g3 (x86_64 target, but > doesn't seem to matter), shows wrong values for p (function parameter) > when debugging. [...] This sounds like . - FChE

Function parameter debug info at -O0

2012-08-06 Thread Senthil Kumar Selvaraj
Hi, The following program, when compiled with -O0 -g3 (x86_64 target, but doesn't seem to matter), shows wrong values for p (function parameter) when debugging. [saaadhu@jaguar scratch]$ cat test.c int func(int p) { p = 20; p = 30; } int main() { int local = 42; func(local); } T