This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 4.0 regression: missing debug info for global variables in C with -O2
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 30 May 2005 15:14:17 -0400
- Subject: Re: 4.0 regression: missing debug info for global variables in C with -O2
- References: <200505301859.j4UIxBV7027249@53v30g15.boeblingen.de.ibm.com>
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 all.
I could not reproduce it with any of the following examples on
i686-pc-linux-gnu
with dwarf-2:
static int i;
int main(void)
{
i += 3;
i *= 5;
return 0;
}
-----
int i;
int main(void)
{
i += 3;
i *= 5;
return 0;
}
----
int main(void)
{
static int i;
i += 3;
i *= 5;
return 0;
}
---
Do you have an example which fails?
Thanks,
Andrew Pinski