Re: gcc 3.4.2 stack variable lifetime analysis

2005-05-04 Thread Jakub Jelinek
On Wed, May 04, 2005 at 07:22:12AM -0700, Earl Chew wrote: > Can anyone tell me if there is a patch for this problem? Yes, there is: ftp://sources.redhat.com/pub/gcc/releases/gcc-4.0.0/diffs/gcc-3.4.3-4.0.0.diff.bz2 FYI, this is PR middle-end/9997 > Consider: > > void bar(char*); > > v

Re: gcc 3.4.2 stack variable lifetime analysis

2005-05-04 Thread Steven Bosscher
On Wednesday 04 May 2005 16:22, Earl Chew wrote: > Can anyone tell me if there is a patch for this problem? The patch is called GCC 4.0. Gr. Steven

gcc 3.4.2 stack variable lifetime analysis

2005-05-04 Thread Earl Chew
Can anyone tell me if there is a patch for this problem? Consider: void bar(char*); void foo(int x) { if (x) { char y[4096]; bar(y); } else { char z[4096]; bar(z); } } Cygwin gcc 3.4.2 -O2 yields: pushl %ebp movl$8216, %eax /* Should be abou