http://bugzilla.novell.com/show_bug.cgi?id=585243

http://bugzilla.novell.com/show_bug.cgi?id=585243#c0


           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@lists.ximian.com
        ReportedBy: rkump...@novell.com
         QAContact: mono-bugs@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
vanishes.

-- 
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.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to