[PATCH] Fix visibility of constructors/destructors with -fwhole-program

Richard Guenther rguenther@suse.de
Sat Mar 27 15:52:00 GMT 2010


On Sat, 27 Mar 2010, John David Anglin wrote:

> > This patch fixes PR middle-end/41674.  With -fwhole-program, the
> > constructor _GLOBAL__I_65535_0_main has its public flag turned off
> > by function_and_variable_visibility and thereby made local.  However,
> > these symbols need to be global for collect2 to arrange to call them.
> > 
> > Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
> 
> Here is take 2.  The first version was deemed overkill and Richard suggested
> using DECL_PRESERVE_P.
> 
> Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11 with no regressions.
> 
> Ok for trunk?

Ok.

Thanks,
Richard.



More information about the Gcc-patches mailing list