Summary: | [1.5][compiler] Enum switch tables incorrectly generated by the compiler | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Piotr Kobzda <pikob> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | frederic_fusier, philippe_mulet | ||||||
Version: | 3.2 | ||||||||
Target Milestone: | 3.2.1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Piotr Kobzda
2006-05-15 13:11:34 EDT
I'll look at it. We either fill the array with -1 or we never use the value 0 as a return value through the X.$SWITCH_TABLE$Action() call. Philippe, This is quite easy to fix. I'll prepare a fix for tomorrow. This will give me the time to run all the tests. Piotr, nice catch and thanks for the nice test case. I have a fix. I'll do more testing before I post it. Created attachment 41544 [details]
Regression test
Created attachment 41547 [details]
Proposed fix
This patch doesn't use 0 as a possible value in the SWITCH_TABLE array.
All existing tests passed. Fix looks good. +1 for 3.2.1 Fixed and released in branch 3.2.1. Regression test added in org.eclipse.jdt.core.tests.compiler.regression.EnumTest.test130 Released for 3.2.1 Released for 3.3 M1 while merging TARGET_321 in HEAD Verified for 3.3 M1 using build I20060807-2000. Verified for 3.2.1 using build M20060908-1655 |