[Mono-devel-list] Error in constant propagation optimization

Don Roberts roberts at refactory.com
Fri May 9 11:59:42 EDT 2003


This one's for lupus. The constant propagation optimization has a bug.
Here is a piece of MSIL that can demonstrate it for you. (This is the
latest on that is keeping #Smalltalk from working).
don


.assembly extern mscorlib {}

.assembly foo {}
.module foo.exe

.method public static void test()  {
        .entrypoint
        .maxstack 2

        .locals init (int32, int32)

        ldc.i4.s 10
        stloc.1
        ldc.i4.s 0
loopTop:
        dup
        stloc.0
        ldloc.1
        bge loopEnd
        ldloc.0
        ldc.i4.s 1
        add
        br loopTop
loopEnd:
        ldloc.0
        call void [mscorlib]System.Console::WriteLine(int32)
        ret
}








More information about the Mono-devel-list mailing list