[Mono-bugs] [Bug 23413] New - Failes to compile code that uses the current Interlocked.Increment function.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
14 Apr 2002 12:20:54 -0000
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 totte@labs2.com.
http://bugzilla.ximian.com/show_bug.cgi?id=23413
--- shadow/23413 Sun Apr 14 08:20:54 2002
+++ shadow/23413.tmp.16208 Sun Apr 14 08:20:54 2002
@@ -0,0 +1,56 @@
+Bug#: 23413
+Product: Mono/MCS
+Version: unspecified
+OS: Debian Potato
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: totte@labs2.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Failes to compile code that uses the current Interlocked.Increment function.
+
+Description of Problem:
+
+When compiling code using our current Interlocked.Increment API MCS
+throws an "(process:3387): ** WARNING **: unhandled exception
+System.InvalidCastException: "Cannot cast from source type to destination
+type" "
+
+Steps to reproduce the problem:
+1. Compile the following code with our current Threading lib :
+
+using System;
+
+class Test {
+ public static void Main(String[] args) {
+ long iTest = 1;
+
+ System.Threading.Interlocked.Increment(ref iTest);
+ }
+}
+
+Actual Results:
+
+(process:3387): ** WARNING **: unhandled exception
+System.InvalidCastException: "Cannot cast from source type to destination
+type"
+in Mono.CSharp.Argument:Emit ()
+in Mono.CSharp.Invocation:EmitArguments ()
+in Mono.CSharp.Invocation:EmitCall ()
+in Mono.CSharp.Invocation:Emit ()
+in Mono.CSharp.Invocation:EmitStatement ()
+in Mono.CSharp.StatementExpression:Emit ()
+in Mono.CSharp.Block:Emit ()
+in Mono.CSharp.EmitContext:EmitTopBlock ()
+in Mono.CSharp.Method:Emit ()
+in Mono.CSharp.TypeContainer:Emit ()
+in Mono.CSharp.RootContext:EmitCode ()
+in Mono.CSharp.Driver:MainDriver ()
+in Mono.CSharp.Driver:Main ()