[Mono-bugs] [Bug 513400] New: Invalid IL code generated when unboxing nullables

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 15 21:05:06 EDT 2009


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


           Summary: Invalid IL code generated when unboxing nullables
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: IL assembler
        AssignedTo: jankit at novell.com
        ReportedBy: maximmass at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11)
Gecko/2009060215 Firefox/3.0.11

Running a recent mono build from svn:
/opt/mono-2.4/bin/mono -V
Mono JIT compiler version 2.4 (/branches/mono-2-4/mono r133658 Wed May  6
15:03:38 UTC 2009)

The assembly generated by this gmcs throws the following exception when
attemping to execute the test case below.

Unhandled Exception: System.InvalidProgramException: Invalid IL code in
Test.MyTest:NonWorkingMethod (): IL_0016: ldloca.s  0

This happens when the assembly is executed by mono 1.9x as well as 2.4.




Reproducible: Always

Steps to Reproduce:
using System;

namespace Test{

        public class MyTest{

                static void Main(string[] args) {
                        NonWorkingMethod();
                }

                static void NonWorkingMethod(){
                        int? x = 42;
                        uint y = 42;

                        if(x == y){
                                Console.WriteLine("works.");
                        }
                }
        }
}

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


More information about the mono-bugs mailing list