[Mono-bugs] [Bug 82441][Nor] New - mcs generates invalid IL in string concatenation

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 14 12:07:43 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lluis at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=82441

--- shadow/82441	2007-08-14 12:07:43.000000000 -0400
+++ shadow/82441.tmp.13016	2007-08-14 12:07:43.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 82441
+Product: Mono: Compilers
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: lluis at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs generates invalid IL in string concatenation
+
+Compile and run the following test case:
+
+using System;
+
+public class Bla {
+	public void BuildNode (object treeBuilder, object dataObject, ref string
+label, ref object icon, ref object closedIcon)
+	{
+		label += "(" + DateTime.Now + ")";
+	}
+
+	public static void Main ()
+	{
+		Bla bla = new Bla ();
+		object obj = new object();
+		String str = "test";
+		bla.BuildNode (bla, bla, ref str, ref obj, ref obj);
+		Console.WriteLine (str);
+	}
+}
+
+It crashes with an exception:
+
+Unhandled Exception: System.InvalidProgramException: Invalid IL code in
+Bla:BuildNode (object,object,string&,object&,object&): IL_000b: stelem.ref
+
+This is a recent regression. I could reproduce it after updating from
+r82802 to HEAD.


More information about the mono-bugs mailing list