This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix visibility of constructors/destructors with -fwhole-program
- From: Richard Guenther <rguenther at suse dot de>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org, rguenth at gcc dot gnu dot org
- Date: Sat, 27 Mar 2010 16:00:38 +0100 (CET)
- Subject: Re: [PATCH] Fix visibility of constructors/destructors with -fwhole-program
- References: <20100327142544.59A9F4FA3@hiauly1.hia.nrc.ca>
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.