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 '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 ...

BTW, I tried to understand what the PR18556 problem was, but
apparently reverting the PR18556 patch makes zero difference
on eh53.C -fexceptions -g.

Even if PR18556 is still needed for C++, we could perhaps
check cgraph_global_info_ready before setting DECL_IGNORED_P,
assuming this hunk makes no sense for C code.  Reordering
cgraph_optimize and c_write_global_declarations_1 might be
too risky for 4.0 I'm afraid (the C++ frontend apparently
first calls cgraph_optimize and then wrapup_globals_for_namespace
plus check_global_declarations).

        Jakub

Reply via email to