Skip to content

Commit

Permalink
Fix for LLVM optimization bug. LLVM, in release mode for 64 bit optim…
Browse files Browse the repository at this point in the history
…izes out local variables that shouldn't be optimized out. We need to mark them as volatile so that the optimizer will leave them alone. This fixes the test case supplied here f9485a2#commitcomment-20389321 regarding the previous fix that didn't completely solve the issue f9485a2

Related issues #1701
#1834
  • Loading branch information
shannah committed Jan 6, 2017
1 parent f9485a2 commit 593b677
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public void appendMethodC(StringBuilder b) {
String variableName = lv.getQualifier() + "locals_"+lv.getIndex()+"_";
if (!added.contains(variableName) && lv.getQualifier() != 'o') {
added.add(variableName);
b.append(" ");
b.append(" volatile ");
switch (lv.getQualifier()) {
case 'i' :
b.append("JAVA_INT"); break;
Expand Down

0 comments on commit 593b677

Please sign in to comment.