[Mono-bugs] [Bug 585243] New: gmcs miscompiles field load

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 3 16:30:18 EST 2010



           Summary: gmcs miscompiles field load
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkumpera at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Compile the attached test and look at the result IL for GetInfo:

    .locals init (
        class Driver    V_0,
        class TestHolder    V_1


    IL_002f:  ldloc.1
    IL_0030:  ldobj Test
    IL_0035:  stloc.2 
    IL_0036:  ldarg.1 
    IL_0037:  ldloc.2 
    IL_0038:  stobj Test
    IL_003d:  ret 

The instruction at 0x30 tries to do a ldobj against a reference type, which is
invalid. The right thing would be to generate a ldfld.

Now for the weird bit about this bug, if you move GetInfo to Driver, it

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list