This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix tree_function_versioning with void type DECL_RESULT (PR tree-optimization/51865)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jan 2012 13:03:50 +0100
- Subject: Re: [PATCH] Fix tree_function_versioning with void type DECL_RESULT (PR tree-optimization/51865)
- References: <20120115213643.GX18768@tyan-ft48-01.lab.bos.redhat.com>
> The recent changes in tree_function_versioning broke the following
> testcase. If DECL_RESULT exists, but has void type, then we used to
> remap_decl it before, but now we don't, so in this case the same
> RESULT_DECL is used in two different functions, which upsets ipa-pta, but
> could upset other code too.
>
> Fixed by calling remap_decl again for void type. Bootstrapped/regtested
> on x86_64-linux and i686-linux (on x86_64 including ada). Ok for trunk?
>
> 2012-01-15 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/51865
> * tree-inline.c (tree_function_versioning): Call remap_decl
> on DECL_RESULT whenever it has VOID_TYPE_P type.
>
> * gcc.dg/pr51865.c: New test.
Thanks for fixing this!
--
Eric Botcazou