Re: [PATCH] Fix switch conversion (PR tree-optimization/48809)

2011-05-02 Thread Richard Guenther
On Fri, Apr 29, 2011 at 6:43 PM, Jakub Jelinek ja...@redhat.com wrote: Hi! The following patch fixes a bug in tree-switch-conversion.c with signed index_expr's.  build_arrays would compute index_expr - range_min in index_expr's type and use that as index into CSWTCH.N array, which is wrong,

Re: [PATCH] Fix switch conversion (PR tree-optimization/48809)

2011-05-02 Thread H.J. Lu
On Fri, Apr 29, 2011 at 9:43 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! The following patch fixes a bug in tree-switch-conversion.c with signed index_expr's.  build_arrays would compute index_expr - range_min in index_expr's type and use that as index into CSWTCH.N array, which is wrong,

[PATCH] Fix switch conversion (PR tree-optimization/48809)

2011-04-29 Thread Jakub Jelinek
Hi! The following patch fixes a bug in tree-switch-conversion.c with signed index_expr's. build_arrays would compute index_expr - range_min in index_expr's type and use that as index into CSWTCH.N array, which is wrong, because in this case index_expr 98 - (-62) computed in signed char type

Re: [PATCH] Fix switch conversion (PR tree-optimization/48809)

2011-04-29 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/29/11 10:43, Jakub Jelinek wrote: Hi! The following patch fixes a bug in tree-switch-conversion.c with signed index_expr's. build_arrays would compute index_expr - range_min in index_expr's type and use that as index into CSWTCH.N array,