[PATCH] Fix middle-end/38661, ICE in tree-switch-conversion with INT_MAX as the case statement
Tue Dec 30 14:40:00 GMT 2008
On Tue, Dec 30, 2008 at 1:47 AM, Andrew Pinski <firstname.lastname@example.org> wrote:
> The problem here is that if we have INT_MAX as a case statement, pos
> in build_constructors would wrap around which will cause an infinite
> The fix is to change the loop into a do/while loop and look for the
> wrapping case.
> OK? Bootstrapped and tested on i386-darwin8.11 with no regressions.
> Andrew Pinski
> * tree-switch-conversion.c (build_constructors): Test for wrapping of pos case.
> * gcc.c-torture/compile/pr38661.c: New testcase.
> * gcc.c-torture/compile/pr38661-1.c: New testcase.
More information about the Gcc-patches