This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, CHKP] Fix cdtor merge for instrumented functions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Apr 2015 22:21:25 +0200
- Subject: Re: [PATCH, CHKP] Fix cdtor merge for instrumented functions
- Authentication-results: sourceware.org; auth=none
- References: <20150402151419 dot GB6244 at msticlxl57 dot ims dot intel dot com>
> Hi,
>
> This patch doesn't allow instrumentation thunks calls while merging constructors and destructors. Not isntrumented code is not affeceted. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
>
> Thanks,
> Ilya
> --
> gcc/
>
> 2015-04-02 Ilya Enkovich <ilya.enkovich@intel.com>
>
> * ipa.c (ipa_cdtor_merge): Skip instrumentation thunks.
So the problem here is that you do have two names for the function, one that
is not instrumented and other that is instrumented? I am bit surprised we get
instrumentation on ctors that should not take or return pointer parameter,
but I see one can trigger that at least by manually adding constructor attribute.
I think what you need is to drop DECL_STATIC_CONSTRUCTOR/DESTRUCTURO flags when
producing the transparent alias.
Honza