This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix interaction between switch conversion and section anchors


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.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]