djrieger / mjplusplus

A compiler for the MiniJava language
http://djrieger.github.io/mjplusplus/doc/doxygen/html/
6 stars 1 forks source link

Comparisons between integer variable and constant broken #72

Closed djrieger closed 9 years ago

djrieger commented 9 years ago

Firm says

Verify warning: Cmp less[97:32](main[62]): modes of left+right input are different: P64 and Is

and aborts.

djrieger commented 9 years ago

Also,

int i = 0;      
System.out.println(i);

compiles while

int i = 0;
while (2 < 10) {
    System.out.println(i);
}

results in this error:

Verify warning: Call T[116:45](main[62]): expected mode Is for input 'input 3' but found P64 (Phi P64[114:43])
BigPeet commented 9 years ago

Yeah, the "wrong" mode is what causes the issue #70 as well.

ratefuchs commented 9 years ago

It seems to be fixed. Can we close this?