This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix interaction between switch conversion and section anchors
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Andrew Pinski" <Andrew_Pinski at playstation dot sony dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 20 Jul 2008 19:44:10 +0200
- Subject: Re: [PATCH] Fix interaction between switch conversion and section anchors
- References: <de8d50360807201013o65d8a50du4597a2846103c7d7@mail.gmail.com>
On Sun, Jul 20, 2008 at 7:13 PM, Andrew Pinski
<Andrew_Pinski@playstation.sony.com> wrote:
> Hi,
> The problem here is switch conversion pass creates a new static
> variable and does not register it with the variable pool but instead
> it assembles the variable itself. This is wrong it should be using
> the variable pool like the matrix reordering pass does (via
> add_new_static_var). In the next patch, I will improve this code to
> use add_new_static_var instead here. Since we don't register the
> variable via the register pool, we end up losing the variables the new
> variable now references.
>
> OK? Bootstrapped and tested on powerpc64-linux-gnu with no regressions.
Ok.
Thanks,
Richard.
> The original testcase comes from the Linux kernel via Segher Boessenkool.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-switch-conversion.c (build_one_array): Call
> varpool_mark_needed_node and varpool_finalize_decl instead of
> assemble_variable.
>
> * gcc.c-torture/execute/20080719-1.c: New testcase.
>