compilerpraktikum / compiler

Compiler
MIT License
3 stars 1 forks source link

ArithmeticOptimization bug #127

Closed csicar closed 2 years ago

csicar commented 2 years ago

./build && ./run --compile-firm s.mj -O1 && ./a.out

executable is an infinite loop

class Test{
   public static void main(String[] args) {
    int i = 0;
    int n = 100;
    int t = 0;
    int m = 0;

    while ((n=n-1) > 10 || (n=n-1) > 8 || (n=n-1) > 3+0*((t=n)+(n=m)+(m=t))) {
        System.out.println(i);
    }
   }
}