[PATCH] Fix interaction between switch conversion and section anchors
Richard Guenther
richard.guenther@gmail.com
Sun Jul 20 20:32:00 GMT 2008
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.
>
More information about the Gcc-patches
mailing list