[Mono-bugs] [Bug 82120][Maj] New - += emiited as -= with unary minus expressions
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jul 17 11:22:54 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 rolfkvinge at ya.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82120
--- shadow/82120 2007-07-17 11:22:54.000000000 -0400
+++ shadow/82120.tmp.16013 2007-07-17 11:22:54.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 82120
+Product: Mono: Compilers
+Version: 1.0
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: rolfkvinge at ya.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: += emiited as -= with unary minus expressions
+
+Repro:
+
+class tmp
+{
+ public static void Main ()
+ {
+ int a, c;
+ a = 2; c = 0;
+ c += -a;
+ System.Console.WriteLine (c);
+ }
+}
+
+Prints:
+2
+
+Should print:
+-2
+
+IL:
+ L_0000: ldc.i4.2
+ L_0001: stloc.0
+ L_0002: ldc.i4.0
+ L_0003: stloc.1
+ L_0004: ldloc.1
+ L_0005: ldloc.0
+ L_0006: neg
+?-> L_0007: sub
+ L_0008: stloc.1
+ L_0009: ldloc.1
+ L_000a: call void [mscorlib]System.Console::WriteLine(int32)
More information about the mono-bugs
mailing list