On Wed, May 2, 2012 at 10:32 AM, Steven Bosscher <stevenb....@gmail.com> wrote:
> Hello,
>
> The attached patch fixes PR53153.
>
> The problem is that tree-ssa-forwprop.c propagates away a cast, but
> leaves out-of-range case labels in the switch. Before my patch for
> r186579, the code in stmt.c would remove such case labels before any
> of the RTL expanders got to see them. After my patch, the gimplifier
> removed those out-of-range labels, but forwprop re-introduces them
> and, en passant, makes the type of the switch index expression
> different from the types of the case label values.
>
> This patch adds splits out the case label preprocessing code in
> gimplify.c to a new function, and makes forwprop use it to update the
> switch label values if it changes the switch index type.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?

Ok.

Thanks,
Richard.

> Ciao!
> Steven

Reply via email to