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] |
Hi, 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 loop. 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. Thanks, Andrew Pinski ChangeLog: * 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.
Attachment:
fixPR38661.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |