Re: 4.0 regression: missing debug info for global variables in C with -O2

2005-05-31 Thread Paolo Bonzini
> Yes; in fact 'main' is even superfluous. Just compile > > int var; > > with -S -O2 -g on gcc 3.4 and 4.0 and look at the resulting > assembler file, the difference is quite obvious ... Maybe this is responsible for part of PR21828? Paolo

Re: 4.0 regression: missing debug info for global variables in C with -O2

2005-05-30 Thread Jakub Jelinek
On Mon, May 30, 2005 at 10:13:19PM +0200, Ulrich Weigand wrote: > Andrew Pinski wrote: > > > You can reproduce it using: > > static int i; > > int main(void) > > { > >i += 3; > >i *= 5; > >return 0; > > } > > > > and readelf and looking for the DW_TAG_variable tag. > > Yes; in fact '

Re: 4.0 regression: missing debug info for global variables in C with -O2

2005-05-30 Thread Ulrich Weigand
Andrew Pinski wrote: > You can reproduce it using: > static int i; > int main(void) > { >i += 3; >i *= 5; >return 0; > } > > and readelf and looking for the DW_TAG_variable tag. Yes; in fact 'main' is even superfluous. Just compile int var; with -S -O2 -g on gcc 3.4 and 4.0 and

Re: 4.0 regression: missing debug info for global variables in C with -O2

2005-05-30 Thread Andrew Pinski
On May 30, 2005, at 3:14 PM, Andrew Pinski wrote: On May 30, 2005, at 2:59 PM, Ulrich Weigand wrote: Hello, we've just noticed a quite serious regression in debug info output in GCC 4.0 over previous releases: when building with -funit-at-a-time (which is on by default with -O2), *no* debug

Re: 4.0 regression: missing debug info for global variables in C with -O2

2005-05-30 Thread Andrew Pinski
On May 30, 2005, at 2:59 PM, Ulrich Weigand wrote: Hello, we've just noticed a quite serious regression in debug info output in GCC 4.0 over previous releases: when building with -funit-at-a-time (which is on by default with -O2), *no* debug info for global variables appears to be emitted at a

4.0 regression: missing debug info for global variables in C with -O2

2005-05-30 Thread Ulrich Weigand
Hello, we've just noticed a quite serious regression in debug info output in GCC 4.0 over previous releases: when building with -funit-at-a-time (which is on by default with -O2), *no* debug info for global variables appears to be emitted at all. The problem appears to be this piece of code in ch