Summary: | [compiler] Codegen bug for continue statement | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tim Hanson <thanson> | ||||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | critical | ||||||||||
Priority: | P3 | CC: | eclipse | ||||||||
Version: | 3.2 | ||||||||||
Target Milestone: | 3.2 RC1 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Tim Hanson
2006-04-07 12:57:39 EDT
Created attachment 38020 [details]
Decompiled class file
The bug comes from the while(false) and the usage of a continue statement. In this case we never placed the corresponding label. Philippe, we could either place the label even if the condition is false or nullify the continue label in this case. Created attachment 38021 [details]
Proposed fix
This patch places the continueLabel even if the condition is the constant false.
This is in case the continueLabel has not been nullify in the data flow analysis.
The test case runs ok with this fix.
I'll run all tests to validate it.
Philippe, Candidate for RC1. Created attachment 38022 [details]
Regression test
Add test in org.eclipse.jdt.core.tests.compiler.regression.FlowAnalysisTest
Definitely RC1 candidate. Will look into it. Came up with same fix. Added FlowAnalysisTest#test024. Fixed Test got renumbered to FlowAnalysisTest#test025 indeed. Verified for 3.2 RC1 using Build id: I20060413-0010. |